﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk" xmlns:System="clr-namespace:System;assembly=mscorlib" xmlns:prim="clr-namespace:System.Windows.Controls.Primitives;assembly=System.Windows.Controls" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d">

    <!-- Global Settings. -->
    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="Brushes.xaml" />
        <ResourceDictionary Source="Fonts.xaml" />
        <ResourceDictionary Source="CoreStyles.xaml" />
    </ResourceDictionary.MergedDictionaries>

    <!-- Redefine this brush for new color variations -->
    <LinearGradientBrush x:Key="TreeViewItemSelectionBorder" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFBED126" Offset="0" />
        <GradientStop Color="#2626292F" Offset="1" />
    </LinearGradientBrush>
    
<!-- 
	***************************************************************************
	DescriptionViewer
	***************************************************************************
	-->
	
<Style TargetType="sdk:DescriptionViewer">
	<Setter Property="IsTabStop" Value="False"/>
	<Setter Property="GlyphTemplate">
		<Setter.Value>
			<ControlTemplate TargetType="Button">
				<Grid>
					<VisualStateManager.VisualStateGroups>
						<VisualStateGroup x:Name="CommonStates">
							<VisualState x:Name="Normal"/>
							<VisualState x:Name="MouseOver">
								<Storyboard>
									<DoubleAnimation Duration="0" To="1"
Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Icon"/>
								</Storyboard>
							</VisualState>
							<VisualState x:Name="Pressed">
								<Storyboard>
									<DoubleAnimation Duration="0" To="1"
Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Icon"/>
								</Storyboard>
							</VisualState>
							<VisualState x:Name="Disabled"/>
						</VisualStateGroup>
					</VisualStateManager.VisualStateGroups>
					<Grid x:Name="Icon" HorizontalAlignment="Center" Opacity="0.8"
VerticalAlignment="Center" >
						<Ellipse Width="16" Height="16" Fill="#34acd9">
							<Ellipse.Effect>
								<DropShadowEffect BlurRadius="3" ShadowDepth="1"
Direction="-90" Color="Black" Opacity="0.5" />
							</Ellipse.Effect>
						</Ellipse>
						<Path Width="12" Height="12" Stretch="Fill" Fill="#FFFFFF"
Data="F1 M 395.999,176.127C 333.109,176.127 282.128,227.109 282.128,290C 282.128,352.891 333.109,403.873 395.999,403.873C
458.891,403.873 509.872,352.891 509.872,290C 509.872,227.109
458.891,176.127 395.999,176.127 Z M 397.915,194.443C 410.167,194.443
420.669,204.945 420.669,217.197C 420.669,229.699 410.167,240.201 397.915,240.201C 385.663,240.201 375.161,229.699 375.161,217.197C
375.161,204.945 385.663,194.443 397.915,194.443 Z M 437.421,374.472C
426.92,374.472 409.667,373.222 397.665,373.222C 385.913,373.222
371.661,374.472 361.16,374.472C 360.16,374.472 359.158,370.972 359.158,368.972C 359.158,367.222 360.16,363.721 361.16,363.471C
373.161,362.22 378.162,358.22 378.162,342.467L 378.162,304.961C
378.162,291.709 373.161,288.959 361.16,287.959C 360.16,287.709
359.158,284.458 359.158,282.707C 359.158,280.957 360.16,277.457 361.16,277.457C 377.412,274.206 400.166,264.955 411.417,259.704C
412.417,259.203 414.917,257.703 416.919,257.703C 420.919,257.703
422.669,259.203 422.419,260.954C 421.919,271.206 420.419,290.209 420.419,303.211L 420.419,342.467C 420.419,358.22 425.42,362.22 437.421,363.471C 438.421,363.721 439.423,367.222 439.423,368.972C
439.423,370.972 438.421,374.472 437.421,374.472 Z "/>
					</Grid>
				</Grid>
			</ControlTemplate>
		</Setter.Value>
	</Setter>
	<Setter Property="Template">
		<Setter.Value>
			<ControlTemplate TargetType="sdk:DescriptionViewer">
				<StackPanel Orientation="Horizontal">
					<VisualStateManager.VisualStateGroups>
						<VisualStateGroup x:Name="DescriptionStates">
							<VisualState x:Name="NoDescription"/>
							<VisualState x:Name="HasDescription">
								<Storyboard>
									<ObjectAnimationUsingKeyFrames Duration="0"
Storyboard.TargetProperty="Visibility"
Storyboard.TargetName="DescriptionContent">
										<DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
									</ObjectAnimationUsingKeyFrames>
								</Storyboard>
							</VisualState>
						</VisualStateGroup>
					</VisualStateManager.VisualStateGroups>
					<Border BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
Background="{TemplateBinding Background}" Height="{TemplateBinding Height}" Padding="{TemplateBinding Padding}" Width="{TemplateBinding Width}">
						<Button x:Name="DescriptionContent" BorderBrush="#FFFFFFFF"
BorderThickness="1" Background="#00000000"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
IsTabStop="False" Padding="1" Template="{TemplateBinding GlyphTemplate}" Visibility="Collapsed"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
							<ToolTipService.ToolTip>
								<ToolTip Placement="Right" IsHitTestVisible="False" Margin="5,-3,5,0" Content="{TemplateBinding Description}" PlacementTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}" />
							</ToolTipService.ToolTip>
						</Button>
					</Border>
				</StackPanel>
			</ControlTemplate>
		</Setter.Value>
	</Setter>
</Style>

    <!-- 
	***************************************************************************
	OpacityButton (helper style used by other controls)
	***************************************************************************
	-->

    <Style x:Key="OpacityButton" TargetType="Button">
        <Setter Property="Padding" Value="0" />
        <Setter Property="HorizontalContentAlignment" Value="Stretch" />
        <Setter Property="VerticalContentAlignment" Value="Stretch" />
        <Setter Property="Cursor" Value="Hand" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Button">
                    <Grid x:Name="Root" Background="Transparent">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                        		<VisualStateGroup.Transitions>
                        			<VisualTransition GeneratedDuration="00:00:00.2" />
                        			<VisualTransition GeneratedDuration="0" From="Pressed" />
                        			<VisualTransition GeneratedDuration="0" To="Pressed" />
                        		</VisualStateGroup.Transitions>
                        		<VisualState x:Name="Normal" />
                        		<VisualState x:Name="Pressed">
                        			<Storyboard>
                        				<DoubleAnimation Duration="0" Storyboard.TargetName="Translater" Storyboard.TargetProperty="Y" To="1" />
                        				<DoubleAnimation Duration="0" Storyboard.TargetName="ContentSite" Storyboard.TargetProperty="(FrameworkElement.Opacity)" To="1" />
                        			</Storyboard>
                        		</VisualState>
                        		<VisualState x:Name="MouseOver">
                        			<Storyboard>
                        				<DoubleAnimation Storyboard.TargetName="ContentSite" Storyboard.TargetProperty="(FrameworkElement.Opacity)" To="1" />
                        			</Storyboard>
                        		</VisualState>
                        		<VisualState x:Name="Disabled">
                        			<Storyboard>
                        				<DoubleAnimation Duration="0" To="0.25" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="ContentSite" d:IsOptimized="True"/>
                        			</Storyboard>
                        		</VisualState>
                        	</VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <ContentPresenter x:Name="ContentSite" Opacity="0.5" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
                            <ContentPresenter.RenderTransform>
                                <TranslateTransform Y="0" x:Name="Translater" />
                            </ContentPresenter.RenderTransform>
                        </ContentPresenter>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- 
	***************************************************************************
	TreeView (including TreeViewItem)
	***************************************************************************
	-->

    <Style TargetType="sdk:TreeViewItem">
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="Cursor" Value="Arrow" />
        <Setter Property="Foreground" Value="{StaticResource ControlForegroundGreen}" />
        <Setter Property="HorizontalContentAlignment" Value="Left" />
        <Setter Property="IsTabStop" Value="True" />
        <Setter Property="Padding" Value="4" />
        <Setter Property="TabNavigation" Value="Once" />
        <Setter Property="VerticalContentAlignment" Value="Top" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="sdk:TreeViewItem">
                    <Grid Background="{x:Null}" Margin="{TemplateBinding Padding}">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="9" />
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition Width="*" />
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="*" />
                        </Grid.RowDefinitions>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="MouseOver" />
                                <VisualState x:Name="Pressed" />
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="0.55" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Header" />
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="SelectionStates">
                                <VisualState x:Name="Unselected" />
                                <VisualState x:Name="Selected">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Selection" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="SelectedInactive">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Selection" />
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="HasItemsStates">
                                <VisualState x:Name="HasItems" />
                                <VisualState x:Name="NoItems">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="ExpanderButton">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="ExpansionStates">
                                <VisualState x:Name="Collapsed" />
                                <VisualState x:Name="Expanded">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="ItemsHost">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="Visible" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FocusStates">
                                <VisualState x:Name="Focused" />
                                <VisualState x:Name="Unfocused" />
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="ValidationStates">
                                <VisualState x:Name="Valid" />
                                <VisualState x:Name="InvalidUnfocused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="Validation">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="Visible" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="InvalidFocused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="Validation">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="Visible" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="IsOpen" Storyboard.TargetName="ValidationToolTip">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <System:Boolean>True</System:Boolean>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <ToggleButton x:Name="ExpanderButton" Height="9" IsTabStop="False" TabNavigation="Once" VerticalAlignment="Stretch">
                            <ToggleButton.Template>
                                <ControlTemplate TargetType="ToggleButton">
                                    <Grid x:Name="Root" Background="Transparent">
                                        <VisualStateManager.VisualStateGroups>
                                            <VisualStateGroup x:Name="CommonStates">
                                                <VisualState x:Name="Normal" />
                                                <VisualState x:Name="MouseOver" />
                                                <VisualState x:Name="Disabled">
                                                    <Storyboard>
                                                        <DoubleAnimation Duration="0" To=".7" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Root" />
                                                    </Storyboard>
                                                </VisualState>
                                            </VisualStateGroup>
                                            <VisualStateGroup x:Name="CheckStates">
                                                <VisualState x:Name="Unchecked" />
                                                <VisualState x:Name="Checked">
                                                    <Storyboard>
                                                        <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="UncheckedVisual" />
                                                        <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="CheckedVisual" />
                                                    </Storyboard>
                                                </VisualState>
                                            </VisualStateGroup>
                                        </VisualStateManager.VisualStateGroups>
                                        <Grid>
                                            <Border CornerRadius="1">
                                                <Border.Effect>
                                                    <DropShadowEffect Color="#55524f" ShadowDepth="2" BlurRadius="3" Opacity="0.5" />
                                                </Border.Effect>
                                                <Border.Background>
                                                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                        <GradientStop Color="#ffffff" Offset="0" />
                                                        <GradientStop Color="#cccccc" Offset="1" />
                                                    </LinearGradientBrush>
                                                </Border.Background>
                                            </Border>
                                            <Path x:Name="UncheckedVisual" Width="5" Height="5" StrokeThickness="1" Stroke="Black" Data="M0,2.5 L5,2.5 M2.5,0 L2.5,5" Stretch="None" />
                                            <Path x:Name="CheckedVisual" Opacity="0" Width="5" Height="5" StrokeThickness="1" Stroke="Black" Data="M0,2.5 L5,2.5" Stretch="None" />
                                        </Grid>
                                    </Grid>
                                </ControlTemplate>
                            </ToggleButton.Template>
                        </ToggleButton>
                        <Border x:Name="Selection" Grid.Column="1" Margin="2,-4,-6,-4" Background="{StaticResource InputSelectionBrush}" BorderBrush="{StaticResource ColorAccentHighlightBrush}" CornerRadius="1" BorderThickness="0,1,0,0" Opacity="0" Effect="{StaticResource LightControlShadowEffect}"/>
                        <Button x:Name="Header" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Cursor="{TemplateBinding Cursor}" ClickMode="Hover" Grid.Column="1" Foreground="{TemplateBinding Foreground}" Margin="8,0,0,0" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" IsTabStop="False" TabNavigation="Once" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
                            <Button.Template>
                                <ControlTemplate TargetType="Button">
                                    <Grid Background="{TemplateBinding Background}">
                                        <VisualStateManager.VisualStateGroups>
                                            <VisualStateGroup x:Name="CommonStates">
                                                <VisualState x:Name="Normal" />
                                                <VisualState x:Name="Pressed" />
                                                <VisualState x:Name="Disabled">
                                                    <Storyboard>
                                                        <DoubleAnimation Duration="0" To=".55" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Content" />
                                                    </Storyboard>
                                                </VisualState>
                                            </VisualStateGroup>
                                        </VisualStateManager.VisualStateGroups>
                                        <ContentPresenter x:Name="Content" Cursor="{TemplateBinding Cursor}" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" HorizontalAlignment="Left" Margin="0" />
                                    </Grid>
                                </ControlTemplate>
                            </Button.Template>
                            <ContentPresenter ContentTemplate="{TemplateBinding HeaderTemplate}" Content="{TemplateBinding Header}" />
                        </Button>
                        <Border x:Name="Validation" BorderBrush="{StaticResource ErrorBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="2" Grid.Column="1" Margin="4,-2,-4,-2" Visibility="Collapsed">
                            <ToolTipService.ToolTip>
                                <ToolTip x:Name="ValidationToolTip" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}" IsHitTestVisible="True" Placement="Right" PlacementTarget="{Binding ElementName=Header}" Template="{StaticResource ValidationToolTipTemplate}" />
                            </ToolTipService.ToolTip>
                            <Grid Background="Transparent" HorizontalAlignment="Right" Height="10" Margin="0,-4,-4,0" VerticalAlignment="Top" Width="10">
                                <Path Data="M 1,0 L6,0 A 2,2 90 0 1 8,2 L8,7 Z" Fill="{StaticResource ErrorBrush}" Margin="-1,3,0,0" />
                            </Grid>
                        </Border>
                        <ItemsPresenter x:Name="ItemsHost" Grid.ColumnSpan="2" Grid.Column="1" Grid.Row="1" Visibility="Collapsed" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="sdk:TreeView">
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="BorderBrush" Value="Transparent" />
        <Setter Property="BorderThickness" Value="0" />
        <Setter Property="Cursor" Value="Arrow" />
        <Setter Property="Foreground" Value="{StaticResource ControlForegroundGreen}" />
        <Setter Property="HorizontalContentAlignment" Value="Left" />
        <Setter Property="IsTabStop" Value="True" />
        <Setter Property="Padding" Value="1" />
        <Setter Property="TabNavigation" Value="Once" />
        <Setter Property="VerticalContentAlignment" Value="Top" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="sdk:TreeView">
                    <Grid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="MouseOver" />
                                <VisualState x:Name="Pressed" />
                                <VisualState x:Name="Disabled" />
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FocusStates">
                                <VisualState x:Name="Focused" />
                                <VisualState x:Name="Unfocused" />
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="ValidationStates">
                                <VisualState x:Name="Valid" />
                                <VisualState x:Name="InvalidUnfocused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="Validation">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="Visible" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="InvalidFocused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="Validation">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="Visible" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="IsOpen" Storyboard.TargetName="ValidationToolTip">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <System:Boolean>True</System:Boolean>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="2">
                            <Border Background="{TemplateBinding Background}" Margin="1" Padding="{TemplateBinding Padding}">
                                <ScrollViewer x:Name="ScrollViewer" BorderBrush="Transparent" BorderThickness="0" Background="{x:Null}" HorizontalScrollBarVisibility="Auto" IsTabStop="False" TabNavigation="Once" VerticalScrollBarVisibility="Auto">
                                    <ItemsPresenter />
                                </ScrollViewer>
                            </Border>
                        </Border>
                        <Border x:Name="Validation" BorderBrush="{StaticResource ErrorBrush}" BorderThickness="{TemplateBinding BorderThickness}" Grid.Column="1" CornerRadius="2" Visibility="Collapsed">
                            <ToolTipService.ToolTip>
                                <ToolTip x:Name="ValidationToolTip" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}" IsHitTestVisible="True" Placement="Right" PlacementTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}" Template="{StaticResource ValidationToolTipTemplate}" />
                            </ToolTipService.ToolTip>
                            <Grid Background="Transparent" HorizontalAlignment="Right" Height="10" Margin="0,-4,-4,0" VerticalAlignment="Top" Width="10">
                                <Path Data="M 1,0 L6,0 A 2,2 90 0 1 8,2 L8,7 Z" Fill="{StaticResource ErrorBrush}" Margin="-1,3,0,0" />
                                <Path Data="M 0,0 L2,0 L 8,6 L8,8" Fill="#FFFFFFFF" Margin="-1,3,0,0" />
                            </Grid>
                        </Border>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- 
	***************************************************************************
	DatePicker (including DatePickerTextBox and DropDownButton)
	***************************************************************************
	-->

    <ControlTemplate x:Key="DateDropDownButtonTemplate" TargetType="Button">
        <Grid FlowDirection="LeftToRight">
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CommonStates">
                    <VisualStateGroup.Transitions>
                        <VisualTransition GeneratedDuration="0" />
                        <VisualTransition GeneratedDuration="0:0:0.1" To="MouseOver" />
                        <VisualTransition GeneratedDuration="0:0:0.1" To="Pressed" />
                    </VisualStateGroup.Transitions>
                    <VisualState x:Name="Normal" />
                    <VisualState x:Name="MouseOver">
                        <Storyboard>
                            <DoubleAnimation Duration="0" Storyboard.TargetName="PressedElement" Storyboard.TargetProperty="(FrameworkElement.Opacity)" To="0" />
                            <DoubleAnimation Duration="0" Storyboard.TargetName="MouseOverElement" Storyboard.TargetProperty="(FrameworkElement.Opacity)" To="1" />
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Pressed">
                        <Storyboard>
                            <DoubleAnimation Duration="0" Storyboard.TargetName="NormalElement" Storyboard.TargetProperty="(FrameworkElement.Opacity)" To="0.25" />
                            <DoubleAnimation Duration="0" Storyboard.TargetName="PressedElement" Storyboard.TargetProperty="(FrameworkElement.Opacity)" To="1" />
                            <DoubleAnimation Duration="0" Storyboard.TargetName="MouseOverElement" Storyboard.TargetProperty="(FrameworkElement.Opacity)" To="0" />
                            <DoubleAnimation Duration="0" Storyboard.TargetName="HighlightElement" Storyboard.TargetProperty="(FrameworkElement.Opacity)" To="0.5" />
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Disabled">
                        <Storyboard>
                            <DoubleAnimationUsingKeyFrames BeginTime="0" Duration="00:00:00.001" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="DisabledVisual">
                                <SplineDoubleKeyFrame KeyTime="0" Value="1" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid Width="26" Height="24" VerticalAlignment="Top">
                <Border CornerRadius="1">
                    <Border.Background>
                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                            <GradientStop Color="#FFFFFFFF" Offset="0.65" />
                            <GradientStop Color="#FFF2F2F2" Offset="0.90" />
                            <GradientStop Color="#FFDADADA" Offset="1" />
                        </LinearGradientBrush>
                    </Border.Background>
                    <Border.Effect>
                        <DropShadowEffect Color="#55524f" ShadowDepth="2" BlurRadius="3" Opacity="0.5" />
                    </Border.Effect>
                </Border>
                <Border x:Name="NormalElement" Height="6" VerticalAlignment="Top" CornerRadius="1,1,0,0" Background="{StaticResource ControlBackgroundNormalGreen}" />
                <TextBlock Text="16" FontSize="14" Foreground="#FF292D2F" FontWeight="Bold" FontFamily="Arial" Margin="0,6,0,0" VerticalAlignment="Center" HorizontalAlignment="Center" />
                <Border x:Name="MouseOverElement" Height="6" Background="{StaticResource ControlBackgroundOverGreen}" CornerRadius="2,2,0,0" Opacity="0" VerticalAlignment="Top" />
                <Border x:Name="PressedElement" Height="6" Background="{StaticResource ControlBackgroundPressedGreen}" CornerRadius="2,2,0,0" Opacity="0" VerticalAlignment="Top" />
                <Border x:Name="HighlightElement" Height="6" BorderBrush="{StaticResource HighlightBrushGreen}" BorderThickness="0.5,1,0,0" CornerRadius="1,1,0,0" VerticalAlignment="Top" />
                <Border x:Name="DisabledVisual" Background="{StaticResource DisabledBrush}" CornerRadius="1,1,0,0" Opacity="0" />
            </Grid>
        </Grid>
    </ControlTemplate>
    <Style TargetType="prim:DatePickerTextBox">
        <Setter Property="Background" Value="White" />
        <Setter Property="BorderBrush" Value="{StaticResource ControlBorderBrush}" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="Foreground" Value="{StaticResource InputForegroundBrush}" />
        <Setter Property="HorizontalContentAlignment" Value="Left" />
        <Setter Property="Padding" Value="5,4,5,4" />
        <Setter Property="SelectionBackground" Value="{StaticResource InputSelectionBrush}" />
        <Setter Property="SelectionForeground" Value="{StaticResource InputSelectionForegroundBrush}" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="prim:DatePickerTextBox">
                    <Grid x:Name="Root">
                        <Grid.Resources>
                            <SolidColorBrush x:Key="WatermarkBrush" Color="#FFAAAAAA" />
                        </Grid.Resources>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                        		<VisualStateGroup.Transitions>
                        			<VisualTransition GeneratedDuration="0" />
                        			<VisualTransition GeneratedDuration="0:0:0.1" To="MouseOver" />
                        		</VisualStateGroup.Transitions>
                        		<VisualState x:Name="Normal" />
                        		<VisualState x:Name="MouseOver" />
                        		<VisualState x:Name="Disabled"/>
                        		<VisualState x:Name="ReadOnly"/>
                        	</VisualStateGroup>
                            <VisualStateGroup x:Name="WatermarkStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="0" />
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Unwatermarked" />
                                <VisualState x:Name="Watermarked">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="ContentElement" />
                                        <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Watermark" />
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FocusStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="0" />
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Focused">
                                	<Storyboard>
                                	   <DoubleAnimation Duration="0" Storyboard.TargetName="FocusVisualElement" Storyboard.TargetProperty="(FrameworkElement.Opacity)" To="1" />
                                	</Storyboard>
                                </VisualState>
                                <VisualState x:Name="Unfocused" />
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border x:Name="Border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="2.5" Opacity="1">
                            <Grid x:Name="WatermarkContent">
                                <Border x:Name="ContentElement" BorderThickness="1" Padding="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
                                <ContentControl x:Name="Watermark" Background="{TemplateBinding Background}" Content="{TemplateBinding Watermark}" Foreground="{StaticResource WatermarkBrush}" FontSize="{TemplateBinding FontSize}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" IsHitTestVisible="False" IsTabStop="False" Opacity="0" Padding="2" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}" />
                            </Grid>
                        </Border>
                        <Rectangle x:Name="FocusVisualElement" IsHitTestVisible="False" Margin="1" Opacity="0" RadiusX="1" RadiusY="1" Stroke="{StaticResource FocusVisualBrush}" StrokeThickness="{StaticResource FocusVisualStrokeThickness}" />
                        <Border x:Name="OuterHighlight" BorderBrush="{StaticResource ControlOuterHighlightBrush}" BorderThickness="0,0,1,1" CornerRadius="3" Margin="0,0,-1,-1" />
                        <Border x:Name="InnerShadowDark" BorderBrush="{StaticResource InnerShadowDarkBrush}" BorderThickness="1,1,0,0" CornerRadius="2" Margin="1" />
                        <Border x:Name="InnerShadowLight" BorderBrush="{StaticResource InnerShadowLightBrush}" BorderThickness="1,1,0,0" CornerRadius="1" Margin="2" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="sdk:DatePicker">
        <Setter Property="Background" Value="{StaticResource InputBackgroundBrush}" />
        <Setter Property="BorderBrush" Value="{StaticResource ControlBorderBrush}" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="HorizontalContentAlignment" Value="Stretch" />
        <Setter Property="IsTabStop" Value="False" />
        <Setter Property="Padding" Value="5,4,5,4" />
        <Setter Property="SelectionBackground" Value="{StaticResource InputSelectionBrush}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="sdk:DatePicker">
                    <Grid x:Name="Root">
                        <Grid.Resources>
                            <ControlTemplate x:Key="DropDownButtonTemplate" TargetType="Button">
                                <Grid FlowDirection="LeftToRight">
                                    <VisualStateManager.VisualStateGroups>
                                        <VisualStateGroup x:Name="CommonStates">
                                            <VisualStateGroup.Transitions>
                                                <VisualTransition GeneratedDuration="0" />
                                                <VisualTransition GeneratedDuration="0:0:0.1" To="MouseOver" />
                                                <VisualTransition GeneratedDuration="0:0:0.1" To="Pressed" />
                                            </VisualStateGroup.Transitions>
                                            <VisualState x:Name="Normal" />
                                            <VisualState x:Name="MouseOver">
                                                <Storyboard>
                                                    <DoubleAnimation Duration="0" Storyboard.TargetName="PressedElement" Storyboard.TargetProperty="(FrameworkElement.Opacity)" To="0" />
                                                    <DoubleAnimation Duration="0" Storyboard.TargetName="MouseOverElement" Storyboard.TargetProperty="(FrameworkElement.Opacity)" To="1" />
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Pressed">
                                                <Storyboard>
                                                    <DoubleAnimation Duration="0" Storyboard.TargetName="NormalElement" Storyboard.TargetProperty="(FrameworkElement.Opacity)" To="0.25" />
                                                    <DoubleAnimation Duration="0" Storyboard.TargetName="PressedElement" Storyboard.TargetProperty="(FrameworkElement.Opacity)" To="1" />
                                                    <DoubleAnimation Duration="0" Storyboard.TargetName="MouseOverElement" Storyboard.TargetProperty="(FrameworkElement.Opacity)" To="0" />
                                                    <DoubleAnimation Duration="0" Storyboard.TargetName="HighlightElement" Storyboard.TargetProperty="(FrameworkElement.Opacity)" To="0.5" />
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Disabled" />
                                        </VisualStateGroup>
                                    </VisualStateManager.VisualStateGroups>
                                    <Grid Width="26" Height="24" VerticalAlignment="Top">
                                        <Border CornerRadius="1">
                                            <Border.Background>
                                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                    <GradientStop Color="#FFFFFFFF" Offset="0.65" />
                                                    <GradientStop Color="#FFF2F2F2" Offset="0.90" />
                                                    <GradientStop Color="#FFDADADA" Offset="1" />
                                                </LinearGradientBrush>
                                            </Border.Background>
                                            <Border.Effect>
                                                <DropShadowEffect Color="#55524f" ShadowDepth="2" BlurRadius="3" Opacity="0.5" />
                                            </Border.Effect>
                                        </Border>
                                        <Border x:Name="NormalElement" Height="6" VerticalAlignment="Top" CornerRadius="1,1,0,0" Background="{StaticResource ColorAccentBrush}" />
                                        <TextBlock Text="16" FontSize="14" Foreground="#FF292D2F" FontWeight="Bold" FontFamily="Arial" Margin="0,6,0,0" VerticalAlignment="Center" HorizontalAlignment="Center" />
                                        <Border x:Name="MouseOverElement" Height="6" Background="{StaticResource ColorAccentOverBrush}" CornerRadius="2,2,0,0" Opacity="0" VerticalAlignment="Top" />
                                        <Border x:Name="PressedElement" Height="6" Background="{StaticResource ColorAccentSubduedBrush}" CornerRadius="2,2,0,0" Opacity="0" VerticalAlignment="Top" />
                                        <Border x:Name="HighlightElement" Height="6" BorderBrush="{StaticResource ColorAccentHighlightBrush}" BorderThickness="0.5,1,0,0" CornerRadius="1,1,0,0" VerticalAlignment="Top" />
                                        <Border x:Name="DisabledVisual" Background="{StaticResource DisabledBrush}" CornerRadius="1,1,0,0" Opacity="0" />
                                    </Grid>
                                </Grid>
                            </ControlTemplate>
                        </Grid.Resources>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="Auto" />
                        </Grid.ColumnDefinitions>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="0.55" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="DisabledVisual" />
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="ValidationStates">
                                <VisualState x:Name="Valid" />
                                <VisualState x:Name="InvalidUnfocused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="ValidationErrorElement">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="InvalidFocused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="ValidationErrorElement">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="Visible" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="IsOpen" Storyboard.TargetName="validationTooltip">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <System:Boolean>True</System:Boolean>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <prim:DatePickerTextBox x:Name="TextBox" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Grid.Column="0" Height="28" Padding="{TemplateBinding Padding}" SelectionBackground="{TemplateBinding SelectionBackground}" Foreground="{StaticResource ControlForeground}" SelectionForeground="{StaticResource InputSelectionForegroundBrush}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
                        <Border x:Name="ValidationErrorElement" BorderBrush="{StaticResource ErrorBrush}" BorderThickness="1" CornerRadius="3" Grid.Column="0" Visibility="Collapsed">
                            <ToolTipService.ToolTip>
                                <ToolTip x:Name="validationTooltip" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}" Placement="Right" PlacementTarget="{Binding ElementName=TextBox}" Template="{StaticResource ValidationToolTipTemplate}">
                                    <ToolTip.Triggers>
                                        <EventTrigger RoutedEvent="Canvas.Loaded">
                                            <BeginStoryboard>
                                                <Storyboard>
                                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="IsHitTestVisible" Storyboard.TargetName="validationTooltip">
                                                        <DiscreteObjectKeyFrame KeyTime="0">
                                                            <DiscreteObjectKeyFrame.Value>
                                                                <System:Boolean>true</System:Boolean>
                                                            </DiscreteObjectKeyFrame.Value>
                                                        </DiscreteObjectKeyFrame>
                                                    </ObjectAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </BeginStoryboard>
                                        </EventTrigger>
                                    </ToolTip.Triggers>
                                </ToolTip>
                            </ToolTipService.ToolTip>
                            <Grid Background="Transparent" HorizontalAlignment="Right" Height="12" Margin="1,-4,-4,0" VerticalAlignment="Top" Width="12">
                                <Path Data="M 1,0 L6,0 A 2,2 90 0 1 8,2 L8,7 z" Fill="{StaticResource ErrorBrush}" Margin="1,3,0,0" />
                            </Grid>
                        </Border>
                        <Button x:Name="Button" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Foreground="{TemplateBinding Foreground}" Grid.Column="1" Margin="4,2,2,0" Template="{StaticResource DropDownButtonTemplate}" Width="26" />
                        <Grid x:Name="DisabledVisual" Grid.ColumnSpan="2" IsHitTestVisible="False" Opacity="0">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="*" />
                                <ColumnDefinition Width="Auto" />
                            </Grid.ColumnDefinitions>
                            <Rectangle Fill="{StaticResource DisabledBrush}" RadiusX="3" RadiusY="3" Margin="0,0,-1,-1" />
                            <Rectangle Grid.Column="1" Fill="{StaticResource DisabledBrush}" Height="26" Margin="4,0,2,0" RadiusX="1" RadiusY="1" Width="26" />
                        </Grid>
                        <Popup x:Name="Popup" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- 
	*************************************************************************************
	Calendar (including CalendarItem, CalendarButton, and CalendarDayButton styles)
	*************************************************************************************
	-->

    <Style TargetType="prim:CalendarDayButton">
        <Setter Property="Background" Value="{StaticResource HighlightBrushGreen}" />
        <Setter Property="FontSize" Value="9" />
        <Setter Property="HorizontalContentAlignment" Value="Center" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="MinWidth" Value="24" />
        <Setter Property="MinHeight" Value="20" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="prim:CalendarDayButton">
                    <Grid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="0:0:0.1" />
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimation Storyboard.TargetName="OverBackground" Storyboard.TargetProperty="Opacity" To=".5" Duration="0" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <DoubleAnimation Storyboard.TargetName="OverBackground" Storyboard.TargetProperty="Opacity" To=".5" Duration="0" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimation Storyboard.TargetName="OverBackground" Storyboard.TargetProperty="Opacity" To="0" Duration="0" />
                                        <DoubleAnimation Storyboard.TargetName="Content" Storyboard.TargetProperty="Opacity" To=".35" Duration="0" />
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="SelectionStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="0" />
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Unselected" />
                                <VisualState x:Name="Selected">
                                    <Storyboard>
                                        <DoubleAnimation Storyboard.TargetName="SelectedBackground" Storyboard.TargetProperty="Opacity" To="1" Duration="0" />
                                        <ColorAnimation Duration="0" To="White" Storyboard.TargetProperty="(Control.Foreground).(SolidColorBrush.Color)" Storyboard.TargetName="Content" d:IsOptimized="True" />
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="CalendarButtonFocusStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="0" />
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="CalendarButtonFocused" />
                                <VisualState x:Name="CalendarButtonUnfocused" />
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="ActiveStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="0" />
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Active" />
                                <VisualState x:Name="Inactive">
                                    <Storyboard>
                                        <ColorAnimation Duration="0" To="#FF9C9DA0" Storyboard.TargetProperty="(Control.Foreground).(SolidColorBrush.Color)" Storyboard.TargetName="Content" d:IsOptimized="True" />
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="DayStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="0" />
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="RegularDay" />
                                <VisualState x:Name="Today">
                                    <Storyboard>
                                        <DoubleAnimation Storyboard.TargetName="TodayBackground" Storyboard.TargetProperty="Opacity" To="1" Duration="0" />
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="BlackoutDayStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="0" />
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="NormalDay" />
                                <VisualState x:Name="BlackoutDay">
                                    <Storyboard>
                                        <DoubleAnimation Storyboard.TargetName="BlackoutVisual" Storyboard.TargetProperty="Opacity" To="0.55" Duration="0" />
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>

                        <Rectangle x:Name="TodayBackground" Opacity="0" Fill="#FFAAAAAA" RadiusX="1" RadiusY="1" />
                        <Rectangle x:Name="SelectedBackground" Opacity="0" Fill="{StaticResource InputSelectionBrush}" RadiusX="1" RadiusY="1" Effect="{StaticResource LightControlShadowEffect}" />
                        <Rectangle x:Name="OverBackground" Opacity="0" Fill="#2000" RadiusX="1" RadiusY="1" />

                        <ContentControl x:Name="Content" IsTabStop="False" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" FontSize="{TemplateBinding FontSize}" Margin="5,1,5,1" Foreground="#404040" />

                        <Path x:Name="BlackoutVisual" Opacity="0" Margin="3" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" RenderTransformOrigin="0.5,0.5" Fill="{StaticResource DisabledBrush}" Stretch="Fill" Data="M8.1772461,11.029181 L10.433105,11.029181 L11.700684,12.801641 L12.973633,11.029181 L15.191895,11.029181 L12.844727,13.999395 L15.21875,17.060919 L12.962891,17.060919 L11.673828,15.256231 L10.352539,17.060919 L8.1396484,17.060919 L10.519043,14.042364 z" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="prim:CalendarButton">
        <Setter Property="Background" Value="{StaticResource ControlBackgroundOverGreen}" />
        <Setter Property="FontSize" Value="12" />
        <Setter Property="HorizontalContentAlignment" Value="Center" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="MinWidth" Value="42" />
        <Setter Property="MinHeight" Value="40" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="prim:CalendarButton">
                    <Grid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="0:0:0.1" />
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To=".5" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Background" />
                                        <ColorAnimation Duration="0" To="{StaticResource ControlForegroundGreenColor}" Storyboard.TargetProperty="(Control.Foreground).(SolidColorBrush.Color)" Storyboard.TargetName="Content" d:IsOptimized="True" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To=".5" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Background" />
                                        <ColorAnimation Duration="0" To="{StaticResource ControlForegroundGreenColor}" Storyboard.TargetProperty="(Control.Foreground).(SolidColorBrush.Color)" Storyboard.TargetName="Content" d:IsOptimized="True" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled" />
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="SelectionStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="0" />
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Unselected" />
                                <VisualState x:Name="Selected">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To=".75" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="SelectedBackground" />
                                        <ColorAnimation Duration="0" To="{StaticResource ControlForegroundGreenColor}" Storyboard.TargetProperty="(Control.Foreground).(SolidColorBrush.Color)" Storyboard.TargetName="Content" d:IsOptimized="True" />
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="ActiveStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="0" />
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Active" />
                                <VisualState x:Name="Inactive">
                                    <Storyboard>
                                        <ColorAnimation Duration="0" To="#FF777777" Storyboard.TargetProperty="(ContentControl.Foreground).(SolidColorBrush.Color)" Storyboard.TargetName="Content" />
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="CalendarButtonFocusStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="0" />
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="CalendarButtonFocused" />
                                <VisualState x:Name="CalendarButtonUnfocused" />
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FocusStates">
                                <VisualState x:Name="Unfocused" />
                                <VisualState x:Name="Focused" />
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Rectangle x:Name="SelectedBackground" Fill="{TemplateBinding Background}" Opacity="0" RadiusY="1" RadiusX="1" />
                        <Rectangle x:Name="Background" Fill="{TemplateBinding Background}" Opacity="0" RadiusY="1" RadiusX="1" />
                        <ContentControl x:Name="Content" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" Foreground="#FF333333" FontSize="{TemplateBinding FontSize}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" IsTabStop="False" Margin="1,0,1,1" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="prim:CalendarItem">
        <Setter Property="FontWeight" Value="Normal" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="prim:CalendarItem">
                    <Grid Margin="4">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="DisabledVisual" />
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border x:Name="Background" CornerRadius="2" Background="{TemplateBinding Background}">
                            <Border.Effect>
                                <DropShadowEffect Color="#55524f" ShadowDepth="1" BlurRadius="4" Opacity="0.5" />
                            </Border.Effect>
                        </Border>
                        <Border x:Name="HeaderBackground" CornerRadius="2,2,0,0" Height="28" VerticalAlignment="Top" Background="{StaticResource StaticControlBackground}" />
                        <Grid>
                            <Grid.Resources>
                                <ControlTemplate x:Key="HeaderButtonTemplate" TargetType="Button">
                                    <Grid Cursor="Hand">
                                        <VisualStateManager.VisualStateGroups>
                                            <VisualStateGroup x:Name="CommonStates">
                                                <VisualState x:Name="Normal" />
                                                <VisualState x:Name="MouseOver" />
                                                <VisualState x:Name="Disabled">
                                                    <Storyboard>
                                                        <DoubleAnimation Duration="0" To=".5" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Content" />
                                                    </Storyboard>
                                                </VisualState>
                                                <VisualState x:Name="Pressed" />
                                            </VisualStateGroup>
                                            <VisualStateGroup x:Name="FocusStates">
                                                <VisualState x:Name="Unfocused" />
                                                <VisualState x:Name="Focused" />
                                            </VisualStateGroup>
                                        </VisualStateManager.VisualStateGroups>
                                        <ContentControl x:Name="Content" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" Foreground="{StaticResource HeaderForegroundBrush}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" IsTabStop="False" Margin="1,5,1,9" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
                                    </Grid>
                                </ControlTemplate>
                                <DataTemplate x:Name="DayTitleTemplate">
                                    <TextBlock FontWeight="Bold" FontSize="9" HorizontalAlignment="Center" Margin="0,4,0,4" Text="{Binding}" VerticalAlignment="Center" />
                                </DataTemplate>
                            </Grid.Resources>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="Auto" />
                            </Grid.ColumnDefinitions>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="*" />
                            </Grid.RowDefinitions>
                            <Button x:Name="PreviousButton" HorizontalAlignment="Left" Style="{StaticResource OpacityButton}" Visibility="Collapsed" Width="30" >
                            	<Path Data="M1,0 L0,0.5 L1,1" Stretch="Fill" Fill="#404040" Width="5" Height="8" />
							</Button>
                            <Button x:Name="HeaderButton" Grid.Column="1" HorizontalAlignment="Center" Template="{StaticResource HeaderButtonTemplate}" VerticalAlignment="Center" Margin="0,2,0,-2" />
                            <Button x:Name="NextButton" Grid.Column="2" HorizontalAlignment="Right" Style="{StaticResource OpacityButton}" Visibility="Collapsed" Width="30">
                            	<Path Data="M0,0 L1,0.5 L0,1" Stretch="Fill" Fill="#404040" Width="5" Height="8" />                     
							</Button>
                            <Grid x:Name="MonthView" Grid.ColumnSpan="3" Margin="6,6,6,6" Grid.Row="1">
                                <Grid.Resources>
                                    <Style TargetType="TextBlock">
                                        <Setter Property="Effect" Value="{x:Null}" />
                                        <Setter Property="FontSize" Value="9" />
                                        <Setter Property="Foreground" Value="#9fa3aa" />
                                    </Style>
                                </Grid.Resources>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition Width="Auto" />
                                </Grid.ColumnDefinitions>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition Height="Auto" />
                                </Grid.RowDefinitions>
                            </Grid>
                            <Grid x:Name="YearView" Grid.ColumnSpan="3" Margin="6,6,7,6" Grid.Row="1" Visibility="Collapsed">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition Width="Auto" />
                                </Grid.ColumnDefinitions>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition Height="Auto" />
                                </Grid.RowDefinitions>
                            </Grid>
                        </Grid>
                        <Rectangle x:Name="DisabledVisual" Fill="{StaticResource DisabledBrush}" Opacity="0" RadiusY="2" RadiusX="2" Stretch="Fill" Stroke="{StaticResource DisabledBrush}" StrokeThickness="1" Visibility="Collapsed" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="sdk:Calendar">
        <Setter Property="IsTabStop" Value="False" />
        <Setter Property="Background" Value="{StaticResource InputBackgroundBrush}" />
        <Setter Property="BorderThickness" Value="0" />
        <Setter Property="BorderBrush" Value="Transparent" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="sdk:Calendar">
                    <StackPanel x:Name="Root" HorizontalAlignment="Center">
                        <prim:CalendarItem x:Name="CalendarItem" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" />
                    </StackPanel>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- 
	***************************************************************************
	AutoCompleteBox
	***************************************************************************
	-->

    <Style TargetType="sdk:AutoCompleteBox">
        <Setter Property="Background" Value="{StaticResource InputBackgroundBrush}" />
        <Setter Property="BorderBrush" Value="{StaticResource ControlBorderBrush}" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="Foreground" Value="{StaticResource InputForegroundBrush}" />
        <Setter Property="MinWidth" Value="45" />
        <Setter Property="Padding" Value="5,4,5,4" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="sdk:AutoCompleteBox">
                    <Grid Opacity="{TemplateBinding Opacity}">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="PopupStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="0:0:0.1" To="PopupOpened" />
                                    <VisualTransition GeneratedDuration="0:0:0.2" To="PopupClosed" />
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="PopupOpened">
                                    <Storyboard>
                                        <DoubleAnimation To="1.0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="PopupBorder" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="PopupClosed">
                                    <Storyboard>
                                        <DoubleAnimation To="0.0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="PopupBorder" />
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FocusStates">
                                <VisualState x:Name="Focused">
                                	<Storyboard>
                                	   <DoubleAnimation Duration="0" Storyboard.TargetName="FocusVisualElement" Storyboard.TargetProperty="(FrameworkElement.Opacity)" To="1" />
                                	</Storyboard>
                                </VisualState>
                                <VisualState x:Name="Unfocused" />
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="ValidationStates">
                                <VisualState x:Name="Valid" />
                                <VisualState x:Name="InvalidUnfocused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="ValidationErrorElement">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="Visible" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="InvalidFocused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="ValidationErrorElement">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="Visible" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="IsOpen" Storyboard.TargetName="validationTooltip">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <System:Boolean>True</System:Boolean>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Pressed" />
                                <VisualState x:Name="Disabled" />
                                <VisualState x:Name="MouseOver" />
                                <VisualState x:Name="Normal" />
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <TextBox x:Name="Text" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Foreground="{TemplateBinding Foreground}" IsTabStop="True" Margin="0" Padding="{TemplateBinding Padding}" />
                        <Rectangle x:Name="FocusVisualElement" IsHitTestVisible="False" Margin="1" Opacity="0" RadiusX="1" RadiusY="1" Stroke="{StaticResource FocusVisualBrush}" StrokeThickness="{StaticResource FocusVisualStrokeThickness}" />
                        <Border x:Name="ValidationErrorElement" BorderBrush="{StaticResource ErrorBrush}" BorderThickness="1" CornerRadius="1" Visibility="Collapsed">
                            <ToolTipService.ToolTip>
                                <ToolTip x:Name="validationTooltip" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}" Placement="Right" PlacementTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}" Template="{StaticResource ValidationToolTipTemplate}">
                                    <ToolTip.Triggers>
                                        <EventTrigger RoutedEvent="Canvas.Loaded">
                                            <BeginStoryboard>
                                                <Storyboard>
                                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="IsHitTestVisible" Storyboard.TargetName="validationTooltip">
                                                        <DiscreteObjectKeyFrame KeyTime="0">
                                                            <DiscreteObjectKeyFrame.Value>
                                                                <System:Boolean>true</System:Boolean>
                                                            </DiscreteObjectKeyFrame.Value>
                                                        </DiscreteObjectKeyFrame>
                                                    </ObjectAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </BeginStoryboard>
                                        </EventTrigger>
                                    </ToolTip.Triggers>
                                </ToolTip>
                            </ToolTipService.ToolTip>
                            <Grid Background="Transparent" HorizontalAlignment="Right" Height="12" Margin="1,-4,-4,0" VerticalAlignment="Top" Width="12">
                                <Path Data="M 1,0 L6,0 A 2,2 90 0 1 8,2 L8,7 z" Fill="{StaticResource ErrorBrush}" Margin="1,3,0,0" />
                            </Grid>
                        </Border>
                        <Popup x:Name="Popup">
                            <Grid Opacity="{TemplateBinding Opacity}">
                                <Border x:Name="PopupBorder" Background="{StaticResource InputBackgroundBrush}" BorderBrush="{StaticResource ControlBorderBrush}" CornerRadius="0,0,4,4" Effect="{StaticResource ControlShadowEffect}" Height="Auto" HorizontalAlignment="Stretch" Margin="1,0" Opacity="0">
                                    <ListBox x:Name="Selector" Background="{x:Null}" BorderThickness="0" Foreground="{TemplateBinding Foreground}" Padding="0" ItemTemplate="{TemplateBinding ItemTemplate}" ItemContainerStyle="{TemplateBinding ItemContainerStyle}">
                                    	<ListBox.Template>
                                            <ControlTemplate TargetType="ListBox">
                                                <Grid>
                                                    <ScrollViewer x:Name="ScrollViewer" BorderThickness="0" Padding="0" Margin="0">
                                                        <ItemsPresenter />
                                                    </ScrollViewer>
                                                </Grid>
                                            </ControlTemplate>
                                        </ListBox.Template>
                                    </ListBox>
                                </Border>
                            </Grid>
                        </Popup>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- 
	***************************************************************************
	GridSplitter
	***************************************************************************
	-->

	<Style TargetType="sdk:GridSplitter">
		<Setter Property="Background" Value="Transparent"/>
		<Setter Property="IsTabStop" Value="true"/>
		<Setter Property="Padding" Value="10,3" />
		<Setter Property="PreviewStyle">
			<Setter.Value>
				<Style TargetType="Control">
					<Setter Property="Background" Value="#FF868686"/>
					<Setter Property="Template">
						<Setter.Value>
							<ControlTemplate TargetType="Control">
								<Grid x:Name="Root" Opacity=".5">
									<Rectangle Fill="{TemplateBinding Background}"/>
									<Grid x:Name="HorizontalTemplate" Height="2"/>
									<Grid x:Name="VerticalTemplate" Visibility="Collapsed" Width="2"/>
								</Grid>
							</ControlTemplate>
						</Setter.Value>
					</Setter>
				</Style>
			</Setter.Value>
		</Setter>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="sdk:GridSplitter">
					<Grid x:Name="Root" Background="{TemplateBinding Background}" IsHitTestVisible="{TemplateBinding IsEnabled}" d:DesignWidth="30" d:DesignHeight="30">
						<VisualStateManager.VisualStateGroups>
							<VisualStateGroup x:Name="CommonStates">
								<VisualState x:Name="Normal"/>
								<VisualState x:Name="MouseOver"/>
								<VisualState x:Name="Disabled">
									<Storyboard>
										<DoubleAnimation Duration="0" To="0.5" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Root"/>
									</Storyboard>
								</VisualState>
							</VisualStateGroup>
							<VisualStateGroup x:Name="FocusStates">
								<VisualStateGroup.Transitions>
									<VisualTransition GeneratedDuration="0"/>
								</VisualStateGroup.Transitions>
                                <VisualState x:Name="Focused">
                                	<Storyboard>
                                	   <DoubleAnimation Duration="0" Storyboard.TargetName="FocusVisualElement" Storyboard.TargetProperty="(FrameworkElement.Opacity)" To="1" />
                                	</Storyboard>
                                </VisualState>
                                <VisualState x:Name="Unfocused" />
							</VisualStateGroup>
						</VisualStateManager.VisualStateGroups>
						<Grid x:Name="HorizontalTemplate" Height="2" Margin="{TemplateBinding Padding}">
							<Rectangle Height="1" VerticalAlignment="Top">
								<Rectangle.Fill>
									<LinearGradientBrush StartPoint="0,0" EndPoint="1,0">
										<GradientStop Offset="0" Color="#00000000" />
										<GradientStop Offset="0.2" Color="#80000000" />
										<GradientStop Offset="0.8" Color="#80000000" />
										<GradientStop Offset="1" Color="#00000000" />
									</LinearGradientBrush>
								</Rectangle.Fill>
							</Rectangle>
							<Rectangle Height="1" Margin="0,1,0,0">
								<Rectangle.Fill>
									<LinearGradientBrush StartPoint="0,0" EndPoint="1,0">
										<GradientStop Offset="0" Color="#00FFFFFF" />
										<GradientStop Offset="0.2" Color="#80FFFFFF" />
										<GradientStop Offset="0.8" Color="#80FFFFFF" />
										<GradientStop Offset="1" Color="#00FFFFFF" />
									</LinearGradientBrush>
								</Rectangle.Fill>
							</Rectangle>
						</Grid>
						<Grid x:Name="VerticalTemplate" Margin="{TemplateBinding Padding}" Visibility="Collapsed" Width="2">
							<Rectangle HorizontalAlignment="Left" Width="1">
								<Rectangle.Fill>
									<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
										<GradientStop Offset="0" Color="#00000000" />
										<GradientStop Offset="0.2" Color="#80000000" />
										<GradientStop Offset="0.8" Color="#80000000" />
										<GradientStop Offset="1" Color="#00000000" />
									</LinearGradientBrush>
								</Rectangle.Fill>
							</Rectangle>
							<Rectangle Margin="1,0,0,0" Width="1">
								<Rectangle.Fill>
									<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
										<GradientStop Offset="0" Color="#00FFFFFF" />
										<GradientStop Offset="0.2" Color="#80FFFFFF" />
										<GradientStop Offset="0.8" Color="#80FFFFFF" />
										<GradientStop Offset="1" Color="#00FFFFFF" />
									</LinearGradientBrush>
								</Rectangle.Fill>
							</Rectangle>
						</Grid>
                        <Rectangle x:Name="FocusVisualElement" IsHitTestVisible="False" Margin="1" Opacity="0" RadiusX="1" RadiusY="1" Stroke="{StaticResource FocusVisualBrush}" StrokeThickness="{StaticResource FocusVisualStrokeThickness}" />
					</Grid>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

    <!-- 
	***************************************************************************
	DataGrid (including cell, row, column header and row header styles)
	***************************************************************************
	-->

    <ControlTemplate x:Key="DataGridCellTemplate" TargetType="sdk:DataGridCell">
        <Grid x:Name="Root" Background="{TemplateBinding Background}">
            <Grid.ColumnDefinitions>
                <ColumnDefinition />
                <ColumnDefinition Width="Auto" />
            </Grid.ColumnDefinitions>
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CurrentStates">
                    <VisualState x:Name="Regular" />
                    <VisualState x:Name="Current">
                        <Storyboard>
                            <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="FocusVisual" />
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="ValidationStates">
                    <VisualState x:Name="Valid" />
                    <VisualState x:Name="Invalid">
                        <Storyboard>
                            <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="InvalidVisualElement" />
                            <ColorAnimation Duration="0" To="#FFFFFFFF" Storyboard.TargetProperty="(Fill).Color" Storyboard.TargetName="FocusVisual" />
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="CommonStates">
                    <VisualState x:Name="Normal" />
                    <VisualState x:Name="MouseOver" />
                </VisualStateGroup>
                <VisualStateGroup x:Name="SelectionStates">
                    <VisualState x:Name="Unselected" />
                    <VisualState x:Name="Selected" />
                </VisualStateGroup>
                <VisualStateGroup x:Name="FocusStates">
                    <VisualState x:Name="Unfocused" />
                    <VisualState x:Name="Focused" />
                </VisualStateGroup>
                <VisualStateGroup x:Name="InteractionStates">
                    <VisualState x:Name="Display" />
                    <VisualState x:Name="Editing">
                    	<Storyboard>
                    	    <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Content" Storyboard.TargetProperty="(UIElement.Margin)">
                    	        <DiscreteObjectKeyFrame KeyTime="0" Value="0" />
                    	    </ObjectAnimationUsingKeyFrames>
                    	</Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Rectangle x:Name="FocusVisual" Fill="#66FFFFFF" HorizontalAlignment="Stretch" IsHitTestVisible="false" Opacity="1" VerticalAlignment="Stretch" />
            <ContentControl x:Name="Content" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
            <Rectangle x:Name="InvalidVisualElement" HorizontalAlignment="Stretch" IsHitTestVisible="False" Opacity="0" Stroke="{StaticResource ErrorBrush}" StrokeThickness="1" VerticalAlignment="Stretch" />
            <Rectangle x:Name="RightGridLine" Grid.Column="1" VerticalAlignment="Stretch" Width="1" />
        </Grid>
    </ControlTemplate>
    <Style TargetType="sdk:DataGridCell">
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="HorizontalContentAlignment" Value="Stretch" />
        <Setter Property="IsTabStop" Value="False" />
        <Setter Property="Padding" Value="0,2"/>
        <Setter Property="Template" Value="{StaticResource DataGridCellTemplate}" />
        <Setter Property="VerticalContentAlignment" Value="Stretch" />
    </Style>
    <Style x:Key="CenteredCell" TargetType="sdk:DataGridCell">
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="HorizontalContentAlignment" Value="Center" />
        <Setter Property="IsTabStop" Value="False" />
        <Setter Property="Template" Value="{StaticResource DataGridCellTemplate}" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
    </Style>
    <Style TargetType="sdk:DataGridColumnHeader">
        <Setter Property="Foreground" Value="White" />
        <Setter Property="HorizontalContentAlignment" Value="Left" />
        <Setter Property="IsTabStop" Value="False" />
        <Setter Property="Padding" Value="4" />
        <Setter Property="SeparatorBrush" Value="#20FFFFFF" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="sdk:DataGridColumnHeader">
                    <Grid x:Name="Root">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition />
                            <ColumnDefinition Width="Auto" />
                        </Grid.ColumnDefinitions>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="0:0:0.1" />
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="MouseOver" />
                                <VisualState x:Name="Pressed" />
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="SortStates">
                                <VisualState x:Name="Unsorted" />
                                <VisualState x:Name="SortAscending">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="1.0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="SortIcon" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="SortDescending">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="1.0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="SortIcon" />
                                        <DoubleAnimation Duration="0" To="-.9" Storyboard.TargetProperty="(RenderTransform).ScaleY" Storyboard.TargetName="SortIcon" />
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border x:Name="NormalElement" Grid.ColumnSpan="2" Background="{StaticResource DataGridHeaderBrush}" />
                        <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition />
                                <ColumnDefinition Width="Auto" />
                            </Grid.ColumnDefinitions>
                            <ContentPresenter Content="{TemplateBinding Content}" />
                            <Path x:Name="SortIcon" Grid.Column="1" Data="F1 M -5.215,6.099L 5.215,6.099L 0,0L -5.215,6.099 Z " Fill="White" HorizontalAlignment="Left" Margin="4,0,0,0" Opacity="0" RenderTransformOrigin=".5,.5" Stretch="Uniform" VerticalAlignment="Center" Width="8">
                                <Path.RenderTransform>
                                    <ScaleTransform ScaleY=".9" ScaleX=".9" />
                                </Path.RenderTransform>
                            </Path>
                        </Grid>
                        <Border x:Name="VerticalSeparator" BorderBrush="#40000000" BorderThickness="1,0,0,0" Grid.Column="1" Visibility="{TemplateBinding SeparatorVisibility}">
                            <Rectangle Fill="{TemplateBinding SeparatorBrush}" VerticalAlignment="Stretch" Width="1" />
                        </Border>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="sdk:DataGridRowHeader">
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="IsTabStop" Value="False" />
        <Setter Property="SeparatorBrush" Value="#FFFFFFFF" />
        <Setter Property="SeparatorVisibility" Value="Collapsed" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="sdk:DataGridRowHeader">
                    <Grid x:Name="Root">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition />
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition />
                            <RowDefinition />
                            <RowDefinition Height="Auto" />
                        </Grid.RowDefinitions>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="CurrentRowGlyph" />
                                        <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="EditingRowGlyph" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="MouseOverCurrentRowSelected">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="CurrentRowGlyph" />
                                        <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="EditingRowGlyph" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="NormalCurrentRow">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="CurrentRowGlyph" />
                                        <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="EditingRowGlyph" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="NormalSelected">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="CurrentRowGlyph" />
                                        <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="EditingRowGlyph" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="NormalEditingRow">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="CurrentRowGlyph" />
                                        <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="EditingRowGlyph" />
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="ValidationStates">
                                <VisualState x:Name="RowValid" />
                                <VisualState x:Name="RowInvalid">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="BackgroundRectangle" />
                                        <DoubleAnimation Duration="0" To="0.55" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="RowInvalidVisualElement" />
                                        <ColorAnimation Duration="0" To="#FFDC000C" Storyboard.TargetProperty="(Fill).(GradientStops)[0].Color" Storyboard.TargetName="CurrentRowGlyph" />
                                        <ColorAnimation Duration="0" To="#FFDC000C" Storyboard.TargetProperty="(Fill).(GradientStops)[1].Color" Storyboard.TargetName="CurrentRowGlyph" />
                                        <ColorAnimation Duration="0" To="#FFDC000C" Storyboard.TargetProperty="(Fill).(GradientStops)[2].Color" Storyboard.TargetName="CurrentRowGlyph" />
                                        <ColorAnimation Duration="0" To="#FFDC000C" Storyboard.TargetProperty="(Fill).(GradientStops)[0].Color" Storyboard.TargetName="EditingRowGlyph" />
                                        <ColorAnimation Duration="0" To="#FFDC000C" Storyboard.TargetProperty="(Fill).(GradientStops)[1].Color" Storyboard.TargetName="EditingRowGlyph" />
                                        <ColorAnimation Duration="0" To="#FFDC000C" Storyboard.TargetProperty="(Fill).(GradientStops)[2].Color" Storyboard.TargetName="EditingRowGlyph" />
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border BorderBrush="#20000000" BorderThickness="0,0,1,0" Grid.ColumnSpan="2" Grid.RowSpan="3">
                            <Grid Background="{TemplateBinding Background}">
                                <Rectangle x:Name="RowInvalidVisualElement" Grid.ColumnSpan="2" Fill="{StaticResource ErrorBrush}" Opacity="0" Grid.RowSpan="3" Stretch="Fill" />
                                <Rectangle x:Name="BackgroundRectangle" Grid.ColumnSpan="2" Fill="Transparent" Grid.RowSpan="3" Stretch="Fill" />
                            </Grid>
                        </Border>
                        <Rectangle x:Name="HorizontalSeparator" Grid.ColumnSpan="2" Fill="{TemplateBinding SeparatorBrush}" HorizontalAlignment="Stretch" Height="1" Margin="1,0,1,0" Grid.Row="2" Visibility="{TemplateBinding SeparatorVisibility}" />
                        <ContentPresenter Content="{TemplateBinding Content}" Grid.Column="1" HorizontalAlignment="Center" Grid.RowSpan="2" VerticalAlignment="Center" />
                        <Path x:Name="CurrentRowGlyph" Data="F1 M 511.047,352.682L 511.047,342.252L 517.145,347.467L 511.047,352.682 Z " Fill="White" HorizontalAlignment="Center" Height="10" Margin="8,0,8,0" Opacity="0" Grid.RowSpan="2" Stretch="Fill" VerticalAlignment="Center" Width="6" />
                        <Path x:Name="EditingRowGlyph" Data="F1 M 511.047,352.682L 511.047,342.252L 517.145,347.467L 511.047,352.682 Z " Fill="White" HorizontalAlignment="Center" Height="10" Margin="8,0,8,0" Opacity="0" Grid.RowSpan="2" Stretch="Fill" VerticalAlignment="Center" Width="6" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="sdk:DataGridRow">
        <Setter Property="IsTabStop" Value="False" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="sdk:DataGridRow">
                    <sdk:DataGridFrozenGrid x:Name="Root">
                        <sdk:DataGridFrozenGrid.Resources>
                            <!--
                    		<Style TargetType="TextBlock">
                    			<Setter Property="Foreground" Value="White" />
							</Style>
							-->
                            <Storyboard x:Key="DetailsVisibleTransition">
                                <DoubleAnimation Duration="00:00:0.1" Storyboard.TargetProperty="ContentHeight" Storyboard.TargetName="DetailsPresenter" />
                            </Storyboard>
                        </sdk:DataGridFrozenGrid.Resources>
                        <sdk:DataGridFrozenGrid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition />
                        </sdk:DataGridFrozenGrid.ColumnDefinitions>
                        <sdk:DataGridFrozenGrid.RowDefinitions>
                            <RowDefinition />
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                        </sdk:DataGridFrozenGrid.RowDefinitions>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="0:0:0.1" />
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="NormalAlternatingRow" />
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="0.5" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="MouseOverElement" d:IsOptimized="True" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="NormalSelected">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="SelectedElement" d:IsOptimized="True" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="MouseOverSelected">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="SelectedElement" d:IsOptimized="True" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="UnfocusedSelected">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="SelectedElement" d:IsOptimized="True" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="UnfocusedEditing" />
                                <VisualState x:Name="NormalEditing" />
                                <VisualState x:Name="MouseOverUnfocusedEditing">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="0.5" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="MouseOverElement" d:IsOptimized="True" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="MouseOverEditing">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="0.5" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="MouseOverElement" d:IsOptimized="True" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="MouseOverUnfocusedSelected">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="0.5" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="SelectedElement" d:IsOptimized="True" />
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="ValidationStates">
                                <VisualState x:Name="Valid" />
                                <VisualState x:Name="Invalid">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="0.55" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="InvalidVisualElement" />
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Rectangle x:Name="MouseOverElement" Fill="{StaticResource ColorAccentHighlightBrush}" Grid.ColumnSpan="2" Opacity="0" Grid.RowSpan="2" />
                        <Rectangle x:Name="SelectedElement" Fill="{StaticResource ColorAccentHighlightBrush}" Grid.ColumnSpan="2" Opacity="0" Grid.RowSpan="2" />
                        <Rectangle x:Name="InvalidVisualElement" Grid.ColumnSpan="2" Fill="{StaticResource ErrorBrush}" Opacity="0" Grid.RowSpan="2" />
                        <sdk:DataGridRowHeader x:Name="RowHeader" sdk:DataGridFrozenGrid.IsFrozen="True" Grid.RowSpan="3" />
                        <sdk:DataGridCellsPresenter x:Name="CellsPresenter" Grid.Column="1" sdk:DataGridFrozenGrid.IsFrozen="True" />
                        <sdk:DataGridDetailsPresenter x:Name="DetailsPresenter" Grid.Column="1" Grid.Row="1" />
                        <Rectangle x:Name="BottomGridLine" Grid.Column="1" HorizontalAlignment="Stretch" Height="1" Grid.Row="2" />
                    </sdk:DataGridFrozenGrid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <ControlTemplate x:Key="TopLeftHeaderTemplate" TargetType="sdk:DataGridColumnHeader">
        <Border Background="{StaticResource DataGridHeaderBrush}" CornerRadius="2,0,0,0">
            <Border BorderBrush="{TemplateBinding SeparatorBrush}" BorderThickness="0,0,1,0" Grid.Column="1">
                <Rectangle Fill="#20000000" HorizontalAlignment="Right" VerticalAlignment="Stretch" Width="1" />
            </Border>
        </Border>
    </ControlTemplate>
    <ControlTemplate x:Key="TopRightHeaderTemplate" TargetType="sdk:DataGridColumnHeader">
        <Border Background="{StaticResource DataGridHeaderBrush}" CornerRadius="0,2,0,0">
            <Border BorderBrush="#20000000" BorderThickness="1,0,0,0">
                <Rectangle Fill="{TemplateBinding SeparatorBrush}" HorizontalAlignment="Left" VerticalAlignment="Stretch" Width="1" />
            </Border>
        </Border>
    </ControlTemplate>
    <Style TargetType="sdk:DataGrid">
        <Setter Property="AlternatingRowBackground" Value="#E0E0E0" />
        <Setter Property="AutoGenerateColumns" Value="True" />
        <Setter Property="Background" Value="#FFF0F0F0" />
        <Setter Property="BorderBrush" Value="{StaticResource ControlBorderBrush}" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="CanUserReorderColumns" Value="True" />
        <Setter Property="CanUserResizeColumns" Value="True" />
        <Setter Property="CanUserSortColumns" Value="True" />
        <Setter Property="GridLinesVisibility" Value="None" />
        <Setter Property="HeadersVisibility" Value="Column" />
        <Setter Property="HorizontalGridLinesBrush" Value="#20000000" />
        <Setter Property="HorizontalScrollBarVisibility" Value="Auto" />
        <Setter Property="IsTabStop" Value="True" />
        <Setter Property="RowBackground" Value="#00FFFFFF" />
        <Setter Property="RowDetailsVisibilityMode" Value="VisibleWhenSelected" />
        <Setter Property="SelectionMode" Value="Extended" />
        <Setter Property="VerticalGridLinesBrush" Value="#20000000" />
        <Setter Property="VerticalScrollBarVisibility" Value="Auto" />
        <Setter Property="DragIndicatorStyle">
            <Setter.Value>
                <Style TargetType="ContentControl">
                    <Setter Property="Foreground" Value="#7FFFFFFF" />
                    <Setter Property="Template">
                        <Setter.Value>
                            <ControlTemplate TargetType="ContentControl">
                                <Grid>
                                    <VisualStateManager.VisualStateGroups>
                                        <VisualStateGroup x:Name="SortStates">
                                            <VisualState x:Name="Unsorted" />
                                            <VisualState x:Name="SortAscending">
                                                <Storyboard>
                                                    <DoubleAnimation Duration="0" To="1.0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="SortIcon" />
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="SortDescending">
                                                <Storyboard>
                                                    <DoubleAnimation Duration="0" To="1.0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="SortIcon" />
                                                    <DoubleAnimation Duration="0" To="-.9" Storyboard.TargetProperty="(RenderTransform).ScaleY" Storyboard.TargetName="SortIcon" />
                                                </Storyboard>
                                            </VisualState>
                                        </VisualStateGroup>
                                    </VisualStateManager.VisualStateGroups>
                                    <Rectangle x:Name="BackgroundRectangle" Grid.ColumnSpan="2" Fill="#66808080" Stretch="Fill" />
                                    <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition />
                                            <ColumnDefinition Width="Auto" />
                                        </Grid.ColumnDefinitions>
                                        <ContentPresenter Content="{TemplateBinding Content}" />
                                        <Path x:Name="SortIcon" Grid.Column="1" Data="F1 M -5.215,6.099L 5.215,6.099L 0,0L -5.215,6.099 Z " Fill="#7FFFFFFF" HorizontalAlignment="Left" Margin="4,0,0,0" Opacity="0" RenderTransformOrigin=".5,.5" Stretch="Uniform" VerticalAlignment="Center" Width="8">
                                            <Path.RenderTransform>
                                                <ScaleTransform ScaleY=".9" ScaleX=".9" />
                                            </Path.RenderTransform>
                                        </Path>
                                    </Grid>
                                </Grid>
                            </ControlTemplate>
                        </Setter.Value>
                    </Setter>
                </Style>
            </Setter.Value>
        </Setter>
        <Setter Property="DropLocationIndicatorStyle">
            <Setter.Value>
                <Style TargetType="ContentControl">
                    <Setter Property="Background" Value="#FF3F4346" />
                    <Setter Property="Width" Value="2" />
                    <Setter Property="Template">
                        <Setter.Value>
                            <ControlTemplate TargetType="ContentControl">
                                <Rectangle Fill="{TemplateBinding Background}" Height="{TemplateBinding Height}" Width="{TemplateBinding Width}" />
                            </ControlTemplate>
                        </Setter.Value>
                    </Setter>
                </Style>
            </Setter.Value>
        </Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="sdk:DataGrid">
                    <Grid>
                        <Grid.Resources>
                            <Style TargetType="TextBlock">
                                <Setter Property="FontWeight" Value="Normal" />
                                <Setter Property="Foreground" Value="#404040" />
                            </Style>
                        </Grid.Resources>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="DisabledVisualElement" />
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="ValidationStates">
                                <VisualState x:Name="Invalid" />
                                <VisualState x:Name="Valid" />
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="2.5">
                            <Grid x:Name="Root">
                                <Grid.Resources>
                                    <ControlTemplate x:Key="TopLeftHeaderTemplate" TargetType="sdk:DataGridColumnHeader">
                                        <Border Background="{StaticResource DataGridHeaderBrush}" CornerRadius="2,0,0,0">
                                            <Border BorderBrush="{TemplateBinding SeparatorBrush}" BorderThickness="0,0,1,0" Grid.Column="1">
                                                <Rectangle Fill="#20000000" HorizontalAlignment="Right" VerticalAlignment="Stretch" Width="1" />
                                            </Border>
                                        </Border>
                                    </ControlTemplate>
                                    <ControlTemplate x:Key="TopRightHeaderTemplate" TargetType="sdk:DataGridColumnHeader">
                                        <Border Background="{StaticResource DataGridHeaderBrush}" CornerRadius="0,2,0,0">
                                            <Border BorderBrush="#20000000" BorderThickness="1,0,0,0">
                                                <Rectangle Fill="{TemplateBinding SeparatorBrush}" HorizontalAlignment="Left" VerticalAlignment="Stretch" Width="1" />
                                            </Border>
                                        </Border>
                                    </ControlTemplate>
                                </Grid.Resources>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition />
                                    <ColumnDefinition Width="Auto" />
                                </Grid.ColumnDefinitions>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition />
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition Height="Auto" />
                                </Grid.RowDefinitions>
                                <Border x:Name="ColumnHeaderBackground" Background="{StaticResource DataGridHeaderBrush}" CornerRadius="2,2,0,0" Grid.ColumnSpan="3" MinHeight="28" />
                                <sdk:DataGridColumnHeader x:Name="TopLeftCornerHeader" Template="{StaticResource TopLeftHeaderTemplate}" Width="22" />
                                <sdk:DataGridColumnHeadersPresenter x:Name="ColumnHeadersPresenter" Grid.Column="1" />
                                <sdk:DataGridColumnHeader x:Name="TopRightCornerHeader" Grid.Column="2" Template="{StaticResource TopRightHeaderTemplate}" />
                                <Rectangle x:Name="ColumnHeadersAndRowsSeparator" Grid.ColumnSpan="3" Fill="#FFC9CACA" Height="1" StrokeThickness="1" VerticalAlignment="Bottom" Width="Auto" />
                                <sdk:DataGridRowsPresenter x:Name="RowsPresenter" Grid.ColumnSpan="2" Grid.Row="1" />
                                <Border x:Name="BottomRightCorner" CornerRadius="0,0,2,0" Grid.Column="2" Grid.Row="2" />
                                <Border x:Name="BottomLeftCorner" CornerRadius="0,0,0,2" Grid.ColumnSpan="2" Grid.Row="2" />
                                <ScrollBar x:Name="VerticalScrollbar" Grid.Column="2" Margin="0" Orientation="Vertical" Grid.Row="1" Width="18" />
                                <Grid Grid.Column="1" Grid.Row="2">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="Auto" />
                                        <ColumnDefinition />
                                    </Grid.ColumnDefinitions>
                                    <Rectangle x:Name="FrozenColumnScrollBarSpacer" />
                                    <ScrollBar x:Name="HorizontalScrollbar" Grid.Column="1" Height="18" Orientation="Horizontal" />
                                </Grid>

                                <Border x:Name="ColumnHeaderBorder" CornerRadius="3,3,0,0" Grid.ColumnSpan="3" MinHeight="28" BorderBrush="#3f3f42" BorderThickness="1,1,1,0" Margin="0,-1,-1,1" />
                                <Border x:Name="OuterHighlight" BorderBrush="#40FFFFFF" BorderThickness="0,0,1,1" CornerRadius="3" Grid.ColumnSpan="3" Grid.RowSpan="4" Margin="0,0,-2,-2" />
                                <Border x:Name="InnerShadowDark" BorderBrush="#50505050" BorderThickness="1,0,0,0" CornerRadius="2" Grid.ColumnSpan="3" Grid.RowSpan="4" Margin="0" />
                                <Border x:Name="InnerShadowLight" BorderBrush="#20202020" BorderThickness="1,1,0,0" CornerRadius="1" Grid.ColumnSpan="3" Grid.RowSpan="4" Margin="1,0,1,1" />

                                <sdk:ValidationSummary x:Name="ValidationSummary" Grid.ColumnSpan="3" MaxHeight="90" Grid.Row="3" />
                            </Grid>
                        </Border>
                        <Border x:Name="DisabledVisualElement" Background="{StaticResource DisabledBrush}" CornerRadius="2.5" HorizontalAlignment="Stretch" Height="Auto" IsHitTestVisible="False" Opacity="0" VerticalAlignment="Stretch" Width="Auto" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- 
	***************************************************************************
	Label
	***************************************************************************
	-->

    <Style TargetType="sdk:Label">
        <Setter Property="Foreground" Value="{StaticResource HeaderForegroundBrush}" />
        <Setter Property="FontWeight" Value="Bold" />
        <Setter Property="UseLayoutRounding" Value="True" />
        <Setter Property="Margin" Value="0,0,4,4" />
        <Setter Property="Effect" Value="{StaticResource HeaderTextEffect}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="sdk:Label">
                    <ContentPresenter />
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="PagingTextBoxStyle" TargetType="TextBox">
    	<Setter Property="BorderThickness" Value="0"/>
    	<Setter Property="Background" Value="{StaticResource InputBackgroundBrush}"/>
    	<Setter Property="Foreground" Value="{StaticResource InputForegroundBrush}"/>
    	<Setter Property="Padding" Value="2"/>
    	<Setter Property="SelectionBackground" Value="{StaticResource InputSelectionBrush}"/>
    	<Setter Property="Template">
    		<Setter.Value>
    			<ControlTemplate TargetType="TextBox">
    				<Grid x:Name="RootElement">
    					<VisualStateManager.VisualStateGroups>
    						<VisualStateGroup x:Name="CommonStates">
    							<VisualState x:Name="Normal"/>
    							<VisualState x:Name="MouseOver"/>
    							<VisualState x:Name="Disabled">
    								<Storyboard>
    									<DoubleAnimation To="0.55" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="DisabledVisualElement"/>
    								</Storyboard>
    							</VisualState>
    							<VisualState x:Name="ReadOnly">
    								<Storyboard>
    									<DoubleAnimation To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="ReadOnlyVisualElement"/>
    								</Storyboard>
    							</VisualState>
    						</VisualStateGroup>
    						<VisualStateGroup x:Name="FocusStates">
    							<VisualState x:Name="Focused"/>
    							<VisualState x:Name="Unfocused"/>
    						</VisualStateGroup>
    					</VisualStateManager.VisualStateGroups>
    					<Border x:Name="Border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" CornerRadius="2" Opacity="1">
    						<Grid>
    							<Border x:Name="ReadOnlyVisualElement" Background="{StaticResource ReadOnlyBrush}" Opacity="0"/>
    							<ScrollViewer x:Name="ContentElement" BorderThickness="0" HorizontalAlignment="Left" IsTabStop="False" Padding="{TemplateBinding Padding}" VerticalAlignment="Center"/>
    						</Grid>
    					</Border>
    					<Border x:Name="DisabledVisualElement" Background="{StaticResource DisabledBrush}" CornerRadius="2" IsHitTestVisible="False" Opacity="0"/>
    				</Grid>
    			</ControlTemplate>
    		</Setter.Value>
    	</Setter>
    </Style>
    
    <!-- 
	***************************************************************************
	DataPager
	***************************************************************************
	-->
    
    <Style TargetType="sdk:DataPager">
    	<Setter Property="Background" Value="{StaticResource StaticControlBackground}"/>
    	<Setter Property="BorderBrush" Value="{x:Null}"/>
    	<Setter Property="BorderThickness" Value="0"/>
    	<Setter Property="Foreground" Value="{StaticResource HeaderForegroundBrush}"/>
    	<Setter Property="HorizontalContentAlignment" Value="Center"/>
    	<Setter Property="VerticalContentAlignment" Value="Center"/>
    	<Setter Property="NumericButtonStyle">
    		<Setter.Value>
    			<Style TargetType="ToggleButton">
    				<Setter Property="Foreground" Value="{StaticResource HeaderForegroundBrush}"/>
    				<Setter Property="MinHeight" Value="22"/>
    				<Setter Property="MinWidth" Value="22"/>
    				<Setter Property="HorizontalAlignment" Value="Right"/>
    				<Setter Property="VerticalAlignment" Value="Center"/>
    				<Setter Property="Background" Value="Transparent"/>
    				<Setter Property="BorderThickness" Value="1"/>
    				<Setter Property="Padding" Value="1"/>
    				<Setter Property="Template">
    					<Setter.Value>
    						<ControlTemplate TargetType="ToggleButton">
    							<Grid>
    								<VisualStateManager.VisualStateGroups>
    									<VisualStateGroup x:Name="CommonStates">
    										<VisualState x:Name="Normal"/>
    										<VisualState x:Name="MouseOver"/>
    										<VisualState x:Name="Pressed"/>
    										<VisualState x:Name="Disabled">
    											<Storyboard>
    												<DoubleAnimation Duration="0" To="0.55" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="contentPresenter"/>
    											</Storyboard>
    										</VisualState>
    									</VisualStateGroup>
    									<VisualStateGroup x:Name="CheckStates">
    										<VisualState x:Name="Checked">
    											<Storyboard>
    												<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="CheckedStateOuterBorder"/>
    												<ColorAnimation Duration="0" To="White" Storyboard.TargetProperty="(Control.Foreground).(SolidColorBrush.Color)" Storyboard.TargetName="contentPresenter" d:IsOptimized="True"/>
    											</Storyboard>
    										</VisualState>
    										<VisualState x:Name="Unchecked"/>
    										<VisualState x:Name="Indeterminate"/>
    									</VisualStateGroup>
    									<VisualStateGroup x:Name="FocusStates">
                                            <VisualState x:Name="Focused">
                                            	<Storyboard>
                                            	   <DoubleAnimation Duration="0" Storyboard.TargetName="FocusVisualElement" Storyboard.TargetProperty="(FrameworkElement.Opacity)" To="1" />
                                            	</Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Unfocused" />
    									</VisualStateGroup>
    								</VisualStateManager.VisualStateGroups>
    								<Border x:Name="CheckedStateOuterBorder" Background="{StaticResource InputSelectionBrush}" CornerRadius="2" Height="22" Opacity="0" Width="22"/>
    								<ContentControl x:Name="contentPresenter" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" Foreground="{TemplateBinding Foreground}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                                    <Rectangle x:Name="FocusVisualElement" IsHitTestVisible="False" Margin="1" Opacity="0" RadiusX="1" RadiusY="1" Stroke="{StaticResource FocusVisualBrush}" StrokeThickness="{StaticResource FocusVisualStrokeThickness}" />
    							</Grid>
    						</ControlTemplate>
    					</Setter.Value>
    				</Setter>
    			</Style>
    		</Setter.Value>
    	</Setter>
    	<Setter Property="Template">
    		<Setter.Value>
    			<ControlTemplate TargetType="sdk:DataPager">
    				<Grid x:Name="Root" Background="Transparent">
    					<Grid.Resources>
    						<ControlTemplate x:Key="ButtonTemplate" TargetType="Button">
    							<Grid>
    								<VisualStateManager.VisualStateGroups>
    									<VisualStateGroup x:Name="CommonStates">
    										<VisualState x:Name="Normal"/>
    										<VisualState x:Name="MouseOver">
    											<Storyboard>
    												<ColorAnimation Duration="0" To="#FFFFFFFF" Storyboard.TargetProperty="(BorderBrush).Color" Storyboard.TargetName="OuterBtnBorder"/>
    												<ColorAnimation Duration="0" To="#FFCCD1D6" Storyboard.TargetProperty="(BorderBrush).Color" Storyboard.TargetName="InnerBtnBorder"/>
    											</Storyboard>
    										</VisualState>
    										<VisualState x:Name="Pressed">
    											<Storyboard>
    												<ColorAnimation Duration="0" To="#FFFFFFFF" Storyboard.TargetProperty="(BorderBrush).Color" Storyboard.TargetName="OuterBtnBorder"/>
    												<ColorAnimation Duration="0" To="#00FFFFFF" Storyboard.TargetProperty="(BorderBrush).Color" Storyboard.TargetName="InnerBtnBorder"/>
    											</Storyboard>
    										</VisualState>
    										<VisualState x:Name="Disabled">
    											<Storyboard>
    												<DoubleAnimation Duration="0" To="0.5" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="path"/>
    											</Storyboard>
    										</VisualState>
    									</VisualStateGroup>
    									<VisualStateGroup x:Name="FocusStates">
                                            <VisualState x:Name="Focused">
                                            	<Storyboard>
                                            	   <DoubleAnimation Duration="0" Storyboard.TargetName="FocusVisualElement" Storyboard.TargetProperty="(FrameworkElement.Opacity)" To="1" />
                                            	</Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Unfocused" />
    									</VisualStateGroup>
    								</VisualStateManager.VisualStateGroups>
    								<Border x:Name="OuterBtnBorder" BorderBrush="#00FFFFFF" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" CornerRadius="3">
    									<Border x:Name="InnerBtnBorder" BorderBrush="#00CCD1D6" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="2">
    										<ContentPresenter x:Name="path" Content="{TemplateBinding Content}"/>
    									</Border>
    								</Border>
                                    <Rectangle x:Name="FocusVisualElement" IsHitTestVisible="False" Margin="1" Opacity="0" RadiusX="1" RadiusY="1" Stroke="{StaticResource FocusVisualBrush}" StrokeThickness="{StaticResource FocusVisualStrokeThickness}" />
    							</Grid>
    						</ControlTemplate>
    						<Style x:Key="PagingTextBoxStyle" TargetType="TextBox">
    							<Setter Property="BorderThickness" Value="0"/>
    							<Setter Property="Background" Value="{StaticResource InputBackgroundBrush}"/>
    							<Setter Property="Foreground" Value="{StaticResource InputForegroundBrush}"/>
    							<Setter Property="Padding" Value="2"/>
    							<Setter Property="SelectionBackground" Value="{StaticResource InputSelectionBrush}"/>
    							<Setter Property="Template">
    								<Setter.Value>
    									<ControlTemplate TargetType="TextBox">
    										<Grid x:Name="RootElement">
    											<VisualStateManager.VisualStateGroups>
    												<VisualStateGroup x:Name="CommonStates">
    													<VisualState x:Name="Normal"/>
    													<VisualState x:Name="MouseOver"/>
    													<VisualState x:Name="Disabled">
    														<Storyboard>
    															<DoubleAnimation To="0.55" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="DisabledVisualElement"/>
    														</Storyboard>
    													</VisualState>
    													<VisualState x:Name="ReadOnly">
    														<Storyboard>
    															<DoubleAnimation To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="ReadOnlyVisualElement"/>
    														</Storyboard>
    													</VisualState>
    												</VisualStateGroup>
    												<VisualStateGroup x:Name="FocusStates">
                                                        <VisualState x:Name="Focused">
                                                        	<Storyboard>
                                                        	   <DoubleAnimation Duration="0" Storyboard.TargetName="FocusVisualElement" Storyboard.TargetProperty="(FrameworkElement.Opacity)" To="1" />
                                                        	</Storyboard>
                                                        </VisualState>
                                                        <VisualState x:Name="Unfocused" />
    												</VisualStateGroup>
    											</VisualStateManager.VisualStateGroups>
    											<Border x:Name="Border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" CornerRadius="2" Opacity="1">
    												<Grid>
    													<Border x:Name="ReadOnlyVisualElement" Background="{StaticResource ReadOnlyBrush}" Opacity="0"/>
    													<ScrollViewer x:Name="ContentElement" BorderThickness="0" HorizontalAlignment="Left" IsTabStop="False" Padding="{TemplateBinding Padding}" VerticalAlignment="Center"/>
    												</Grid>
    											</Border>
    											<Border x:Name="DisabledVisualElement" Background="{StaticResource DisabledBrush}" CornerRadius="2" IsHitTestVisible="False" Opacity="0"/>
                                                <Rectangle x:Name="FocusVisualElement" IsHitTestVisible="False" Margin="1" Opacity="0" RadiusX="1" RadiusY="1" Stroke="{StaticResource FocusVisualBrush}" StrokeThickness="{StaticResource FocusVisualStrokeThickness}" />
    										</Grid>
    									</ControlTemplate>
    								</Setter.Value>
    							</Setter>
    						</Style>
    					</Grid.Resources>
    					<VisualStateManager.VisualStateGroups>
    						<VisualStateGroup x:Name="CommonStates">
    							<VisualState x:Name="Normal"/>
    							<VisualState x:Name="Disabled">
    								<Storyboard>
    									<DoubleAnimation Duration="0" To="0.5" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="CurrentPagePrefixTextBlock"/>
    									<DoubleAnimation Duration="0" To="0.5" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="CurrentPageSuffixTextBlock"/>
    								</Storyboard>
    							</VisualState>
    						</VisualStateGroup>
    						<VisualStateGroup x:Name="MoveStates">
    							<VisualState x:Name="MoveEnabled">
    								<Storyboard>
    									<ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="IsEnabled" Storyboard.TargetName="CurrentPageTextBox">
    										<DiscreteObjectKeyFrame KeyTime="0" Value="True"/>
    									</ObjectAnimationUsingKeyFrames>
    								</Storyboard>
    							</VisualState>
    							<VisualState x:Name="MoveDisabled">
    								<Storyboard>
    									<ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="IsEnabled" Storyboard.TargetName="CurrentPageTextBox">
    										<DiscreteObjectKeyFrame KeyTime="0" Value="False"/>
    									</ObjectAnimationUsingKeyFrames>
    								</Storyboard>
    							</VisualState>
    						</VisualStateGroup>
    						<VisualStateGroup x:Name="MoveFirstStates">
    							<VisualState x:Name="MoveFirstEnabled">
    								<Storyboard>
    									<ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="IsEnabled" Storyboard.TargetName="FirstPageButton">
    										<DiscreteObjectKeyFrame KeyTime="0" Value="True"/>
    									</ObjectAnimationUsingKeyFrames>
    								</Storyboard>
    							</VisualState>
    							<VisualState x:Name="MoveFirstDisabled">
    								<Storyboard>
    									<ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="IsEnabled" Storyboard.TargetName="FirstPageButton">
    										<DiscreteObjectKeyFrame KeyTime="0" Value="False"/>
    									</ObjectAnimationUsingKeyFrames>
    								</Storyboard>
    							</VisualState>
    						</VisualStateGroup>
    						<VisualStateGroup x:Name="MovePreviousStates">
    							<VisualState x:Name="MovePreviousEnabled">
    								<Storyboard>
    									<ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="IsEnabled" Storyboard.TargetName="PreviousPageButton">
    										<DiscreteObjectKeyFrame KeyTime="0" Value="True"/>
    									</ObjectAnimationUsingKeyFrames>
    								</Storyboard>
    							</VisualState>
    							<VisualState x:Name="MovePreviousDisabled">
    								<Storyboard>
    									<ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="IsEnabled" Storyboard.TargetName="PreviousPageButton">
    										<DiscreteObjectKeyFrame KeyTime="0" Value="False"/>
    									</ObjectAnimationUsingKeyFrames>
    								</Storyboard>
    							</VisualState>
    						</VisualStateGroup>
    						<VisualStateGroup x:Name="MoveNextStates">
    							<VisualState x:Name="MoveNextEnabled">
    								<Storyboard>
    									<ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="IsEnabled" Storyboard.TargetName="NextPageButton">
    										<DiscreteObjectKeyFrame KeyTime="0" Value="True"/>
    									</ObjectAnimationUsingKeyFrames>
    								</Storyboard>
    							</VisualState>
    							<VisualState x:Name="MoveNextDisabled">
    								<Storyboard>
    									<ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="IsEnabled" Storyboard.TargetName="NextPageButton">
    										<DiscreteObjectKeyFrame KeyTime="0" Value="False"/>
    									</ObjectAnimationUsingKeyFrames>
    								</Storyboard>
    							</VisualState>
    						</VisualStateGroup>
    						<VisualStateGroup x:Name="MoveLastStates">
    							<VisualState x:Name="MoveLastEnabled">
    								<Storyboard>
    									<ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="IsEnabled" Storyboard.TargetName="LastPageButton">
    										<DiscreteObjectKeyFrame KeyTime="0" Value="True"/>
    									</ObjectAnimationUsingKeyFrames>
    								</Storyboard>
    							</VisualState>
    							<VisualState x:Name="MoveLastDisabled">
    								<Storyboard>
    									<ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="IsEnabled" Storyboard.TargetName="LastPageButton">
    										<DiscreteObjectKeyFrame KeyTime="0" Value="False"/>
    									</ObjectAnimationUsingKeyFrames>
    								</Storyboard>
    							</VisualState>
    						</VisualStateGroup>
    						<VisualStateGroup x:Name="DisplayModeStates">
    							<VisualState x:Name="FirstLastNumeric">
    								<Storyboard>
    									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="NextPageButton">
    										<DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
    									</ObjectAnimationUsingKeyFrames>
    									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="PreviousPageButton">
    										<DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
    									</ObjectAnimationUsingKeyFrames>
    									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="CurrentPageTextBox">
    										<DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
    									</ObjectAnimationUsingKeyFrames>
    									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="PageDisplay">
    										<DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
    									</ObjectAnimationUsingKeyFrames>
    								</Storyboard>
    							</VisualState>
    							<VisualState x:Name="FirstLastPreviousNext">
    								<Storyboard>
    									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="NumericButtonPanel">
    										<DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
    									</ObjectAnimationUsingKeyFrames>
    								</Storyboard>
    							</VisualState>
    							<VisualState x:Name="FirstLastPreviousNextNumeric">
    								<Storyboard>
    									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="CurrentPageTextBox">
    										<DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
    									</ObjectAnimationUsingKeyFrames>
    									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="PageDisplay">
    										<DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
    									</ObjectAnimationUsingKeyFrames>
    								</Storyboard>
    							</VisualState>
    							<VisualState x:Name="Numeric">
    								<Storyboard>
    									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="FirstPageButton">
    										<DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
    									</ObjectAnimationUsingKeyFrames>
    									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="LastPageButton">
    										<DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
    									</ObjectAnimationUsingKeyFrames>
    									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="NextPageButton">
    										<DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
    									</ObjectAnimationUsingKeyFrames>
    									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="PreviousPageButton">
    										<DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
    									</ObjectAnimationUsingKeyFrames>
    									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="CurrentPageTextBox">
    										<DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
    									</ObjectAnimationUsingKeyFrames>
    									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="PageDisplay">
    										<DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
    									</ObjectAnimationUsingKeyFrames>
    									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="Separator1">
    										<DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
    									</ObjectAnimationUsingKeyFrames>
    									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="Separator2">
    										<DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
    									</ObjectAnimationUsingKeyFrames>
    								</Storyboard>
    							</VisualState>
    							<VisualState x:Name="PreviousNext">
    								<Storyboard>
    									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="FirstPageButton">
    										<DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
    									</ObjectAnimationUsingKeyFrames>
    									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="LastPageButton">
    										<DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
    									</ObjectAnimationUsingKeyFrames>
    									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="NumericButtonPanel">
    										<DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
    									</ObjectAnimationUsingKeyFrames>
    								</Storyboard>
    							</VisualState>
    							<VisualState x:Name="PreviousNextNumeric">
    								<Storyboard>
    									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="FirstPageButton">
    										<DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
    									</ObjectAnimationUsingKeyFrames>
    									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="LastPageButton">
    										<DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
    									</ObjectAnimationUsingKeyFrames>
    									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="CurrentPageTextBox">
    										<DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
    									</ObjectAnimationUsingKeyFrames>
    									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="PageDisplay">
    										<DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
    									</ObjectAnimationUsingKeyFrames>
    								</Storyboard>
    							</VisualState>
    						</VisualStateGroup>
    						<VisualStateGroup x:Name="TotalPageCountKnownStates">
    							<VisualState x:Name="TotalPageCountKnown"/>
    							<VisualState x:Name="TotalPageCountUnknown"/>
    						</VisualStateGroup>
    					</VisualStateManager.VisualStateGroups>
    					<Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="2" Effect="{StaticResource LightControlShadowEffect}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" MinHeight="28" Padding="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
    						<StackPanel Margin="8,0" Orientation="Horizontal" VerticalAlignment="Stretch">
    							<Button x:Name="FirstPageButton" Style="{StaticResource OpacityButton}" Width="16">
    								<StackPanel Orientation="Horizontal">
    									<Rectangle Width="2" Height="8" Margin="0,0,2,0" Fill="#202020" />
    									<Path Data="M0,0.5 L1,1 1,0Z" Width="5" Height="8" Fill="#202020" Stretch="Fill" />
    								</StackPanel>
    							</Button>
    							<Button x:Name="PreviousPageButton" Style="{StaticResource OpacityButton}" Width="16">
    								<Path Data="M0,0.5 L1,1 1,0Z" Width="5" Height="8" Fill="#202020" Stretch="Fill" />
    							</Button>
    							<StackPanel x:Name="Separator1" Height="24" HorizontalAlignment="Right" Margin="4,2,6,2" Orientation="Horizontal" Width="2">
    								<Rectangle Width="1">
    									<Rectangle.Fill>
    										<LinearGradientBrush EndPoint="1,1" StartPoint="0,0">
    											<GradientStop Color="#0000" Offset="0" />
    											<GradientStop Color="#3000" Offset="0.3" />
    											<GradientStop Color="#3000" Offset="0.7" />
    											<GradientStop Color="#0000" Offset="1" />
    										</LinearGradientBrush>
    									</Rectangle.Fill>
    								</Rectangle>
    								<Rectangle Width="1">
    									<Rectangle.Fill>
    										<LinearGradientBrush EndPoint="1,1" StartPoint="0,0">
    											<GradientStop Color="#0FFF" Offset="0" />
    											<GradientStop Color="#FFFF" Offset="0.3" />
    											<GradientStop Color="#AFFF" Offset="0.7" />
    											<GradientStop Color="#0FFF" Offset="1" />
    										</LinearGradientBrush>
    									</Rectangle.Fill>
    								</Rectangle>
                                    
    							</StackPanel>
                                    
    							<StackPanel x:Name="NumericButtonPanel" Margin="1" Orientation="Horizontal"/>
    							<StackPanel x:Name="PageDisplay" Orientation="Horizontal">
    								<TextBlock x:Name="CurrentPagePrefixTextBlock" Foreground="{TemplateBinding Foreground}" Margin="4,0" VerticalAlignment="Center"/>
    								<TextBox x:Name="CurrentPageTextBox" Foreground="{TemplateBinding Foreground}" Height="20" Style="{StaticResource PagingTextBoxStyle}" VerticalAlignment="Center" Width="40"/>
    								<TextBlock x:Name="CurrentPageSuffixTextBlock" Foreground="{TemplateBinding Foreground}" Margin="4,0" VerticalAlignment="Center"/>
    							</StackPanel>

    							<StackPanel x:Name="Separator2" Height="24" HorizontalAlignment="Right" Margin="6,2,4,2" Orientation="Horizontal">
    								<Rectangle Width="1">
    									<Rectangle.Fill>
    										<LinearGradientBrush EndPoint="1,1" StartPoint="0,0">
    											<GradientStop Color="#0000" Offset="0" />
    											<GradientStop Color="#3000" Offset="0.3" />
    											<GradientStop Color="#3000" Offset="0.7" />
    											<GradientStop Color="#0000" Offset="1" />
    										</LinearGradientBrush>
    									</Rectangle.Fill>
    								</Rectangle>
    								<Rectangle Width="1">
    									<Rectangle.Fill>
    										<LinearGradientBrush EndPoint="1,1" StartPoint="0,0">
    											<GradientStop Color="#0FFF" Offset="0" />
    											<GradientStop Color="#FFFF" Offset="0.3" />
    											<GradientStop Color="#AFFF" Offset="0.7" />
    											<GradientStop Color="#0FFF" Offset="1" />
    										</LinearGradientBrush>
    									</Rectangle.Fill>
    								</Rectangle>
    							</StackPanel>
                                    
    							<Button x:Name="NextPageButton" Style="{StaticResource OpacityButton}" Width="16">
    								<Path Data="M0,0 L1,0.5 0,1Z" Width="5" Height="8" Fill="#202020" Stretch="Fill" />
    							</Button>
    							<Button x:Name="LastPageButton" Style="{StaticResource OpacityButton}" Width="16">
    								<StackPanel Orientation="Horizontal">       						
    									<Path Data="M0,0 L1,0.5 0,1Z" Width="5" Height="8" Fill="#202020" Stretch="Fill" />
    									<Rectangle Width="2" Height="8" Margin="2,0,0,0" Fill="#202020" />
    								</StackPanel>
    							</Button>
    						</StackPanel>
    					</Border>
    				</Grid>
    			</ControlTemplate>
    		</Setter.Value>
    	</Setter>
    </Style>

    <!-- 
	***************************************************************************
	ChildWindow
	***************************************************************************
	-->

    <Style TargetType="sdk:ChildWindow">
    	<Setter Property="Background" Value="#FFE0E0E0"/>
    	<Setter Property="BorderBrush" Value="Red"/>
    	<Setter Property="BorderThickness" Value="1"/>
    	<Setter Property="HorizontalAlignment" Value="Center"/>
    	<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    	<Setter Property="OverlayBrush" Value="#7F000000"/>
    	<Setter Property="OverlayOpacity" Value="1"/>
    	<Setter Property="Padding" Value="10" />
    	<Setter Property="IsTabStop" Value="false"/>
    	<Setter Property="TabNavigation" Value="Cycle"/>
    	<Setter Property="VerticalAlignment" Value="Center"/>
    	<Setter Property="VerticalContentAlignment" Value="Stretch"/>
    	<Setter Property="Template">
    		<Setter.Value>
    			<ControlTemplate TargetType="sdk:ChildWindow">
    				<Grid x:Name="Root">    					
    					<VisualStateManager.VisualStateGroups>
    						<VisualStateGroup x:Name="WindowStates">
    							<VisualState x:Name="Open">
    								<Storyboard>    									
										<ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Panel.Background).(SolidColorBrush.Color)" Storyboard.TargetName="Overlay">
                                            <EasingColorKeyFrame KeyTime="0" Value="#7F000000"/>
                                            <EasingColorKeyFrame KeyTime="0:0:0.3" Value="#00000000"/>
                                        </ColorAnimationUsingKeyFrames>										
    									<DoubleAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetProperty="(RenderTransform).(Children)[0].ScaleX" Storyboard.TargetName="ContentRoot">
    										<SplineDoubleKeyFrame KeyTime="0" Value="0"/>
    										<SplineDoubleKeyFrame KeyTime="00:00:00.25" Value="0"/>
    										<SplineDoubleKeyFrame KeyTime="00:00:00.4" Value="1"/>
    										<SplineDoubleKeyFrame KeySpline="0,0,0.5,1" KeyTime="00:00:00.45" Value="1.05"/>
    										<SplineDoubleKeyFrame KeyTime="00:00:00.55" Value="1"/>
    									</DoubleAnimationUsingKeyFrames>
    									<DoubleAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetProperty="(RenderTransform).(Children)[0].ScaleY" Storyboard.TargetName="ContentRoot">
    										<SplineDoubleKeyFrame KeyTime="0" Value="0"/>
    										<SplineDoubleKeyFrame KeyTime="00:00:00.25" Value="0"/>
    										<SplineDoubleKeyFrame KeyTime="00:00:00.4" Value="1"/>
    										<SplineDoubleKeyFrame KeySpline="0,0,0.5,1" KeyTime="00:00:00.45" Value="1.05"/>
    										<SplineDoubleKeyFrame KeyTime="00:00:00.55" Value="1"/>
    									</DoubleAnimationUsingKeyFrames>
    								</Storyboard>
    							</VisualState>
    							<VisualState x:Name="Closed">
    								<Storyboard>
    									<DoubleAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Overlay">
    										<EasingDoubleKeyFrame KeyTime="0" Value="1"/>
    										<EasingDoubleKeyFrame KeyTime="00:00:00.3" Value="0"/>
    									</DoubleAnimationUsingKeyFrames>
    									<DoubleAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetProperty="(RenderTransform).(Children)[0].ScaleX" Storyboard.TargetName="ContentRoot">
    										<SplineDoubleKeyFrame KeyTime="00:00:00.2" Value="1"/>
    										<SplineDoubleKeyFrame KeyTime="00:00:00.25" Value="1.05"/>
    										<SplineDoubleKeyFrame KeyTime="00:00:00.45" Value="0"/>
    									</DoubleAnimationUsingKeyFrames>
    									<DoubleAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetProperty="(RenderTransform).(Children)[0].ScaleY" Storyboard.TargetName="ContentRoot">
    										<SplineDoubleKeyFrame KeyTime="00:00:00.2" Value="1"/>
    										<SplineDoubleKeyFrame KeyTime="00:00:00.25" Value="1.05"/>
    										<SplineDoubleKeyFrame KeyTime="00:00:00.45" Value="0"/>
    									</DoubleAnimationUsingKeyFrames>
    								</Storyboard>
    							</VisualState>
    						</VisualStateGroup>
    					</VisualStateManager.VisualStateGroups>
    					<Grid x:Name="Overlay" Background="{TemplateBinding OverlayBrush}" HorizontalAlignment="Stretch" Margin="0" Opacity="{TemplateBinding OverlayOpacity}" VerticalAlignment="Top"/>
    					<Grid x:Name="ContentRoot" HorizontalAlignment="{TemplateBinding HorizontalAlignment}" Height="{TemplateBinding Height}" RenderTransformOrigin="0.5,0.5" VerticalAlignment="{TemplateBinding VerticalAlignment}" Width="{TemplateBinding Width}">
    						<Grid.RenderTransform>
    							<TransformGroup>
    								<ScaleTransform/>
    								<SkewTransform/>
    								<RotateTransform/>
    								<TranslateTransform/>
    							</TransformGroup>
    						</Grid.RenderTransform>
    						<Grid.RowDefinitions>
    							<RowDefinition Height="28"/>
    							<RowDefinition Height="*"/>
    						</Grid.RowDefinitions>
    						<Border x:Name="Chrome" Background="{StaticResource StaticControlBackground}" CornerRadius="2,2,0,0" Effect="{StaticResource LightControlShadowEffect}">
    							<Grid Height="Auto" Width="Auto">
    								<Grid.ColumnDefinitions>
    									<ColumnDefinition/>
    									<ColumnDefinition Width="28"/>
    								</Grid.ColumnDefinitions>
    								<ContentControl Content="{TemplateBinding Title}" Effect="{StaticResource ControlTextEffect}" FontWeight="Bold" Foreground="{StaticResource HeaderForegroundBrush}" HorizontalAlignment="Stretch" IsTabStop="False" Margin="12,0" VerticalAlignment="Center"/>
    								<Button x:Name="CloseButton" Grid.Column="1" HorizontalAlignment="Center" IsTabStop="False" Style="{StaticResource OpacityButton}" Width="24">
    									<Path Data="M0,0 L1,1 M0,1 L1,0" Stretch="Fill" Stroke="#404040" StrokeThickness="2" Width="10" Height="10" Effect="{StaticResource ControlTextEffect}" />
    								</Button>
    							</Grid>
    						</Border>
    						<Border Background="{TemplateBinding Background}" Grid.Row="1">
    							<ContentPresenter x:Name="ContentPresenter" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
    						</Border>
    					</Grid>
    				</Grid>
    			</ControlTemplate>
    		</Setter.Value>
    	</Setter>
    </Style>

    <!-- 
	***************************************************************************
	ValidationSummary
	***************************************************************************
	-->

    <Style TargetType="sdk:ValidationSummary">
    	<Setter Property="Background" Value="{StaticResource InputBackgroundBrush}"/>
    	<Setter Property="BorderBrush" Value="{x:Null}"/>
    	<Setter Property="BorderThickness" Value="0"/>
    	<Setter Property="Foreground" Value="{StaticResource InputForegroundBrush}"/>
    	<Setter Property="IsTabStop" Value="False"/>
    	<Setter Property="Padding" Value="8"/>
    	<Setter Property="HeaderTemplate">
    		<Setter.Value>
    			<DataTemplate>
    				<Border x:Name="Header" CornerRadius="2.5,2.5,0,0">
    					<Border.Background>
    						<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
    							<GradientStop Color="#FFEC0A0A" Offset="0"/>
    							<GradientStop Color="#FF910606" Offset="1"/>
    						</LinearGradientBrush>
    					</Border.Background>
    					<Border CornerRadius="2,2,2,0" BorderThickness="1,1,0,0" BorderBrush="#60FF9800">
    						<StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="8,0">
    							<Path Margin="0,-1,6,1" Width="14" Height="12" Fill="White" Data="F1 M 417.40,303.75L 408.87,288.98C 407.83,287.18 406.12,284.22 405.08,282.42L 396.56,267.65C 395.51,265.84 393.81,265.84 392.77,267.65L 384.24,282.42C 383.20,284.22 381.49,287.18 380.45,288.98L 371.93,303.75C 370.89,305.56 371.74,307.03 373.82,307.03L 415.50,307.03C 417.58,307.03 418.44,305.56 417.40,303.75 Z M 396.71,302.05C 396.08,302.66 395.34,302.96 394.49,302.96C 393.62,302.96 392.88,302.66 392.24,302.05C 391.60,301.45 391.28,300.73 391.28,299.89C 391.28,299.05 391.60,298.32 392.24,297.71C 392.88,297.09 393.62,296.79 394.49,296.79C 395.34,296.79 396.08,297.09 396.71,297.71C 397.35,298.32 397.67,299.05 397.67,299.89C 397.67,300.73 397.35,301.45 396.71,302.05 Z M 397.46,283.36C 397.30,284.10 397.10,284.98 396.86,285.99C 396.62,286.94 396.36,288.12 396.06,289.54C 395.76,290.97 395.45,292.72 395.12,294.81L 393.84,294.81C 393.51,292.70 393.19,290.94 392.89,289.53C 392.60,288.13 392.33,286.95 392.1,286.00C 391.89,285.13 391.69,284.28 391.51,283.44C 391.34,282.61 391.25,281.98 391.25,281.56C 391.25,280.71 391.57,279.98 392.20,279.37C 392.82,278.77 393.59,278.47 394.47,278.47C 395.34,278.47 396.10,278.77 396.74,279.37C 397.38,279.98 397.70,280.71 397.70,281.56C 397.70,282.01 397.63,282.61 397.46,283.36 Z " Stretch="Fill" />
    							<TextBlock Foreground="White" FontWeight="Bold"><Run Text="{Binding}"/></TextBlock>
    						</StackPanel>
    					</Border>
    				</Border>
    			</DataTemplate>
    		</Setter.Value>
    	</Setter>
    	<Setter Property="ErrorStyle">
    		<Setter.Value>
    			<Style TargetType="ListBoxItem">
    				<Setter Property="Template">
    					<Setter.Value>
    						<ControlTemplate TargetType="ListBoxItem">
    							<Grid Background="{TemplateBinding Background}">
    								<VisualStateManager.VisualStateGroups>
    									<VisualStateGroup x:Name="CommonStates">
    										<VisualState x:Name="Normal"/>
    										<VisualState x:Name="MouseOver"/>
    										<VisualState x:Name="Disabled">
    											<Storyboard>
    												<DoubleAnimation Duration="0" To=".55" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="ContentPresenter"/>
    											</Storyboard>
    										</VisualState>
    									</VisualStateGroup>
    									<VisualStateGroup x:Name="SelectionStates">
    										<VisualState x:Name="Unselected"/>
    										<VisualState x:Name="Selected"/>
    									</VisualStateGroup>
    									<VisualStateGroup x:Name="FocusStates">
    										<VisualState x:Name="Focused"/>
    										<VisualState x:Name="Unfocused"/>
    									</VisualStateGroup>
    								</VisualStateManager.VisualStateGroups>
    								<ContentPresenter x:Name="ContentPresenter" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" HorizontalAlignment="Left" Margin="{TemplateBinding Padding}"/>
    							</Grid>
    						</ControlTemplate>
    					</Setter.Value>
    				</Setter>
    			</Style>
    		</Setter.Value>
    	</Setter>
    	<Setter Property="Template">
    		<Setter.Value>
    			<ControlTemplate TargetType="sdk:ValidationSummary">
                    <Grid x:Name="ValidationSummary" Effect="{StaticResource LightControlShadowEffect}">
    					<VisualStateManager.VisualStateGroups>
    						<VisualStateGroup x:Name="CommonStates">
    							<VisualState x:Name="Normal"/>
    							<VisualState x:Name="Disabled">
    								<Storyboard>
    									<ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="DisabledVisual">
    										<DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
    									</ObjectAnimationUsingKeyFrames>
    								</Storyboard>
    							</VisualState>
    						</VisualStateGroup>
    						<VisualStateGroup x:Name="ValidationStates">
    							<VisualState x:Name="Empty">
    								<Storyboard>
    									<ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="Content">
    										<DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
    									</ObjectAnimationUsingKeyFrames>
    								</Storyboard>
    							</VisualState>
    							<VisualState x:Name="HasErrors"/>
    						</VisualStateGroup>
    					</VisualStateManager.VisualStateGroups>
    					<Border x:Name="Content">
    						<Grid >
    							<Grid.RowDefinitions>
    								<RowDefinition Height="26"/>
    								<RowDefinition Height="Auto"/>
    							</Grid.RowDefinitions>
    							<Border Background="{TemplateBinding Background}" Grid.Row="1" Height="Auto" CornerRadius="0,0,2.5,2.5">
    								<ListBox x:Name="SummaryListBox" BorderThickness="0" Foreground="{TemplateBinding Foreground}" ItemContainerStyle="{TemplateBinding ErrorStyle}" Padding="{TemplateBinding Padding}" Style="{TemplateBinding SummaryListBoxStyle}" ScrollViewer.HorizontalScrollBarVisibility="Disabled">
    									<ListBox.ItemTemplate>
    										<DataTemplate>
                                                <RichTextBox Background="{x:Null}" BorderBrush="{x:Null}" BorderThickness="0" IsReadOnly="True" Margin="4,0,0,0" Padding="0">
                                                	<Paragraph>
                                                	   <Run FontWeight="Bold" Foreground="#FF404040" Text="{Binding MessageHeader}" /><Run Text=" "/><Run Foreground="#FF808080" Text="{Binding Message}" />
                                                    </Paragraph>
                                                </RichTextBox>
    										</DataTemplate>
    									</ListBox.ItemTemplate>
    								</ListBox>
    							</Border>
    							<Border x:Name="DisabledVisual" Background="{StaticResource DisabledBrush}" IsHitTestVisible="True" Grid.RowSpan="2" Opacity="0.55" Visibility="Collapsed"/>
    							<ContentControl x:Name="HeaderContentControl" ContentTemplate="{TemplateBinding HeaderTemplate}" Content="{TemplateBinding Header}" Foreground="{TemplateBinding Foreground}" HorizontalContentAlignment="Stretch" IsTabStop="False" VerticalContentAlignment="Stretch"/>
    						</Grid>
    					</Border>
    				</Grid>
    			</ControlTemplate>
    		</Setter.Value>
    	</Setter>
    </Style>
	
	<!-- 
	***************************************************************************
	TabControl
	***************************************************************************
	-->

    <Style TargetType="sdk:TabItem">
        <Setter Property="IsTabStop" Value="False" />
        <Setter Property="Background" Value="#D0D0D0" />
        <Setter Property="BorderBrush" Value="#404040" />
        <Setter Property="BorderThickness" Value="1,1,1,0" />
        <Setter Property="Padding" Value="16,4" />
        <Setter Property="VerticalContentAlignment" Value="Stretch" />
        <Setter Property="HorizontalContentAlignment" Value="Stretch" />
        <Setter Property="MinWidth" Value="5" />
        <Setter Property="MinHeight" Value="28" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="sdk:TabItem">
                    <Grid x:Name="Root">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="00:00:00.1" />
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <!--
                                            <ColorAnimation Storyboard.TargetName="BorderTop" Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)" To="#C5E1EB"/>
					                    -->
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled" />
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="SelectionStates">
                                <VisualState x:Name="Unselected" />
                                <VisualState x:Name="Selected" />
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FocusStates">
                                <VisualState x:Name="Focused">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0"
                                                         Storyboard.TargetName="FocusVisualElement"
                                                         Storyboard.TargetProperty="(FrameworkElement.Opacity)"
                                                         To="1" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Unfocused" />
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Grid x:Name="TemplateTopSelected"
                              Canvas.ZIndex="1"
                              Visibility="Collapsed"
                              Margin="0,0,3,0">
                            <Border Margin="0"
                                    Background="{StaticResource DarkBackground}"
                                    CornerRadius="2.5,2.5,0,0"
                                    BorderBrush="{StaticResource DarkBorder}"
                                    BorderThickness="1,1,1,0" />
                            <ContentControl Foreground="White"
                                            x:Name="HeaderTopSelected"
                                            HorizontalAlignment="Center"
                                            Margin="{TemplateBinding Padding}"
                                            VerticalAlignment="Center"
                                            IsTabStop="False" />
                            <Border x:Name="FocusVisualElement"
                                    BorderBrush="{StaticResource FocusVisualBrush}"
                                    BorderThickness="{StaticResource FocusVisualThickness}"
                                    CornerRadius="3,3,0,0"
                                    IsHitTestVisible="False"
                                    Margin="6,3"
                                    Opacity="0" />
                        </Grid>
                        <Grid x:Name="TemplateTopUnselected"
                              Visibility="Collapsed"
                              Margin="0,1,3,0">
                            <Border x:Name="BorderTop"
                                    Margin="0"
                                    Background="{StaticResource DarkBorder}"
                                    CornerRadius="2.5,2.5,0,0" />
                            <Border Height="1"
                                    VerticalAlignment="Bottom"
                                    Background="#4000" />
                            <ContentControl Foreground="#E0FFFFFF"
                                            x:Name="HeaderTopUnselected"
                                            HorizontalAlignment="Center"
                                            Margin="{TemplateBinding Padding}"
                                            VerticalAlignment="Center"
                                            IsTabStop="False" />
                        </Grid>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="sdk:TabControl">
        <Setter Property="IsTabStop" Value="False" />
        <Setter Property="Background" Value="#FFFFFF" />
        <Setter Property="BorderBrush" Value="#404040" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="VerticalContentAlignment" Value="Stretch" />
        <Setter Property="HorizontalContentAlignment" Value="Stretch" />
        <Setter Property="Padding" Value="5" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="sdk:TabControl">
                    <Grid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="0" />
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="Disabled" />
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Grid x:Name="TemplateTop"
                              Visibility="Collapsed"
                              Effect="{StaticResource LightControlShadowEffect}">

                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="*" />
                            </Grid.RowDefinitions>
                            <prim:TabPanel x:Name="TabPanelTop"
                                           Margin="0,2,0,-1"
                                           Canvas.ZIndex="1" />
                            <Border MinHeight="10"
                                    MinWidth="10"
                                    Grid.Row="1"
                                    Background="{StaticResource DarkBackground}"
                                    BorderBrush="{StaticResource DarkBorder}"
                                    CornerRadius="0,2.5,2.5,2.5"
                                    BorderThickness="1">
                                <ContentPresenter x:Name="ContentTop"
                                                  Margin="{TemplateBinding Padding}"
                                                  Cursor="{TemplateBinding Cursor}"
                                                  VerticalAlignment="Stretch"
                                                  HorizontalAlignment="Stretch" />
                            </Border>
                            <Border Visibility="Collapsed"
                                    Background="#c5c5c5"
                                    Height="5"
                                    VerticalAlignment="Top"
                                    Grid.Row="1"
                                    BorderThickness="1,1,1,0"
                                    BorderBrush="{StaticResource DarkBorder}"
                                    CornerRadius="0,2,0,0" />
                        </Grid>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

</ResourceDictionary>